Skip to content
Snippets Groups Projects
Verified Commit e1410a15 authored by David Beniamine's avatar David Beniamine
Browse files

Documentation

parent 40510088
No related tags found
No related merge requests found
...@@ -19,3 +19,31 @@ Then add a cronjob like ...@@ -19,3 +19,31 @@ Then add a cronjob like
``` ```
0 1 * * 1,3,5,7 /opt/duplicity-ftp-backup/backup.sh > /var/log/bckp.log 2>&1 0 1 * * 1,3,5,7 /opt/duplicity-ftp-backup/backup.sh > /var/log/bckp.log 2>&1
``` ```
## Advanced options
### Multiple backup servers
By default the backup system will look for it's configuration in the `.env` file next to the `backup.sh` path, i.e `/opt/duplicity-ftp-backup/.env`.
All the scripts accepts a `.env` path as their first argument, so if you want several cronjobs with different backup server, create as many `.env` file as you need than set your cronjobs :
```
# Main backup
0 1 * * * /opt/duplicity-ftp-backup/backup.sh > /var/log/bckp.log 2>&1
# Secondary backup
0 3 * * 6 /opt/duplicity-ftp-backup/backup.sh /opt/duplicity-ftp-backup/.secondary-server.env > /var/log/bckp-secondary.log 2>&1
```
### Managing externally increment / full backups
The `backup.sh` scripts accepts a second argument telling it the mode i.e `auto` (same as no arguments) or `full` or `inc` if you wish to manually configure your full / increment backup dates :
**One MUST** provide the `.env` argument to use the mode argument, for instance
```
# Full backup every first saturday of every even month a 20:00
0 20 * 1,3,5,7,9,11 6 [ $(date +\%d) -le 07 ] && /root/duplicity-ftp-backup/backup.sh /opt/duplicity-ftp-backup/.env full > /var/log/bckp-full.log 2>&1
# Incremental backup every day a 3 am
0 3 * * * /root/duplicity-ftp-backup/backup.sh /opt/duplicity-ftp-backup/.env inc > /var/log/bckp.log 2>&1
```
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment