Note! This manual is based on a clean Ubuntu or Debian installation. Installation of additional software might require changes in the workflow and/or configuration.
Note! As Duply needs full read access in order to be able to make full backups, it needs to run as root. In this whole manual we will asume that you are logged in as the root user.
Duply can be installed on Ubuntu and/or Debian with the following command:
aptitude install Duply
1. Create a new Duply profile with the command
duply <backupname> create
The profile will be created in your home folder, at the location ~/.duply/ . There will be multiple files in this folder.
2. Generate a GPG key
You can generate a GPG key by using the command
3. Fill the configuration file.
The GPG-key ID and password that you created in the previous step need to be saved in the configuration file that you can find in the location /root/.duply/backup/conf.
The following information needs to be entered into this file:
Additionally, you can put in the following options:
GPG_OPTS='--compress-algo=bzip2 --personal-cipher-preferences AES256,AES192' // set compression & encryption
GPG_TEST='disabled'. // disable GPG key and password validity check before each action
4. Select the backup target
Enter the backup target in the conf file in the following syntax:
In the conf file you will find a list of all supported protocols and their corresponding syntax.
5. Set the backup source
in this example the backup source is the '/www' folder.
6. Specify the maximum age and number of full backups that should be retained:
7. Set Pre and Post files (if needed)
Duply has the option to run scripts right before (pre) and after (post) making a backup.
To be able to execute these scripts, they need to be placed in the duply folder (for instance /home/user/.duply/backupname/pre or /home/user/.duply/backupname/post). Also the files need to be executable.
8. Exclude folders
Duply uses a whitelist. To exclude certain folders from the backup, a file 'exclude' must be made in the Duply directory. In the example below all folders are included in the backup, with the exeption of /var/log and /var/www/.
9. Set cronjob
Duply does not offer a deamon service. You can set a cronjob to run your backups periodically. An example of a cronjob configuration:
0 0 * * 1 /usr/bin/duply /root/.duply/backupname full_verify_purge --force
0 0 * * 2-7 /usr/bin/duply /root/.duply/backupname incr
In this example, every monday at 00:00 hours, a full backup will be made, and all backups which are older as the MAX_AGE are deleted.
Tuesday - Saturday at 00:00 hours incremental backups will be made.