If you have a FTP backup space for your vserver or dedicated server, tartarus is a great tool to create and crypt your backups.
This is my method to backup my Hetzner server
Install tartarus on Debian squeeze: (works on ubuntu too)
Add the following line to:
1 2 | deb http://wertarbyte.de/apt/ ./ vim /etc/apt/sources.list.d/wertarbyte.list |
1 | aptitude update && aptitude install tartarus bzip2 curl |
Create tartarus general config:
1 | vim /etc/tartarus/generic.inc |
Content:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | STORAGE_METHOD="FTP" # FTP-Server STORAGE_FTP_SERVER="hetzner.de" # FTP-Account STORAGE_FTP_USER="username" STORAGE_FTP_PASSWORD="password123" # Compression COMPRESSION_METHOD="bzip2" # Symmetric encryption ENCRYPT_SYMMETRICALLY="yes" # Read pass phrase from ENCRYPT_PASSPHRASE_FILE="/etc/tartarus/backup.sec" # While creating backup don't use more space than available STAY_IN_FILESYSTEM="yes" # Cleanup hook for old backups TARTARUS_POST_PROCESS_HOOK() { echo -n "$STORAGE_FTP_PASSWORD" | /usr/sbin/charon.ftp \ --host "$STORAGE_FTP_SERVER" \ --user "$STORAGE_FTP_USER" --readpassword \ --maxage 7 \ --dir "$STORAGE_FTP_DIR" --profile "$NAME" } # Logging to syslog TARTARUS_DEBUG_HOOK() { echo $DEBUGMSG | logger } |
Create a file with your pass phrase:
1 2 3 | cat /etc/tartarus/backup.sec hONj14Mg1h6sHzIBPBcV # generate a key with pwgen -s 20 |
Create a backup operation:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | # Read main config source /etc/tartarus/generic.inc # Profile name NAME="root" # What to backup DIRECTORY="/" # To exlude EXCLUDE="/tmp/ /proc/ /sys/ /var/tmp/ /var/run/" # No LVM snapshot CREATE_LVM_SNAPSHOT="no" INCREMENTAL_TIMESTAMP_FILE="/var/spool/tartarus/timestamps/root" |
Start your first backup:
1 | tartarus /etc/tartarus/root.conf |
After a full backup you are free to start a incremental backup:
1 | tartarus -i /etc/tartarus/root.conf |
To be able to create incremental backups, you need to create this directory:
1 | mkdir -p /var/spool/tartarus/timestamps/ |
Alexander says
Thank you for the description!