Installing Duplicity on Debian/Ubuntu
Duplicity is a powerful backup tool that supports encryption and incremental backups. Here's how to install and configure Duplicity on a Debian/Ubuntu system:
Step 1: Install Duplicity
First, update your system and install Duplicity:
sudo apt update && sudo apt install duplicity -y
Check Duplicity Version
After installation, verify that Duplicity is installed correctly by running:
duplicity --version
Step 2: Configure Duplicity
-
Creating a Backup
To create an encrypted backup of a directory, use the following command:
bashduplicity /path/to/source/ scp://user@remote_host//path/to/destination/
Here,
/path/to/source/
is the directory you want to back up, andscp://user@remote_host//path/to/destination/
is the backup location. -
Restoring Data
To restore data from a backup, use:
bashduplicity restore scp://user@remote_host//path/to/backup/ /path/to/restore/
Here,
scp://user@remote_host//path/to/backup/
is the location of the backup, and/path/to/restore/
is the target location for restoration. -
Setting Encryption Password
Duplicity uses GnuPG for encryption. Ensure your GPG keys are set up, or use environment variables to set the password:
bashexport PASSPHRASE='your_password'
Step 3: Automate Backups
Duplicity can be easily automated using crontab
. To set up automatic backups, add a job to crontab
:
crontab -e
Then add a line for regularly scheduled backups, for example, to run the backup every day at 2 AM:
0 2 * * * duplicity /path/to/source/ scp://user@remote_host//path/to/destination/
Conclusion
Rclone and Duplicity are excellent tools for file management and backup on Debian/Ubuntu. The choice between them depends on your needs: Rclone is better suited for synchronizing with cloud storage, while Duplicity is ideal for creating encrypted backups.
If you need assistance with installing or configuring these tools, our team is ready to help! Order servers from qckl.net and get free installation and configuration of Rclone or Duplicity!