In association with heise online

Going global

Once configuration has been finished, it's time for our first full global backup. ftplicity backup is the proper command for this. During later passes, duplicity automatically creates the smaller incremental backups if it already finds a backup set present in the FTP archive. ftplicity list displays all files in the backup set. ftplicity verify is used for inspection. Whilst checking each file in the backup for changs, the command creates a list of all modified files that would be backed up through an incremental backup.

ftplicity clean displays incomplete backup archives on the FTP server. A removal using ftplicity clean --force may be necessary under some circumstances if a backup procedure was interrupted and subsequent backups or a verify produce an error message.

The config variable MAXIMUM_AGE allows you to set how far back the incremental backup should reach into the past. The default is set for four weeks (28D). Outdated backup and signature chains can be displayed with ftplicity purge. If you append a --force onto the command, then they are expunged from the FTP archive. duplicity knows not to delete any chains necessary to recreate states from the prior four weeks. The most recent full backup must therefore also be retained and may constipate the FTP directory if it contains too many files that became obsolete after subsequent incremental backups.

From time to time, you therefore may need to force a new full backup using ftplicity full and then remove outdated chains with ftplicity purge --force. Presuming daily incremental backups and a limiting age of four weeks, there should be sufficient FTP space to require a full backup only every other week, although it shouldn't go longer than every two months.

The easiest way to set up an automated nightly backup with a monthly full backup is through the cron scheduling service. You can append something like the following two lines onto the end of the /etc/crontab file:

00 5 * * * root /usr/local/bin/ftplicity backup
00 6 1 * * root /usr/local/bin/ftplicity full && /usr/local/bin/ftplicity purge --force

This particular example orders cron to execute an incremental backup every morning at 5:00 am. A full backup is then created on the first of each month and outdated chains deleted. The service sends a results log for the script by email to the root account.

You should not under any circumstances forget to copy the complete configured .ftplicity directory into a secure place where third parties cannot access it. In the event that the only copy of the key were somehow to go missing during a server drive crash, the backup would be irrevocably lost.

Print Version | Permalink:
  • Twitter
  • Facebook
  • submit to slashdot
  • StumbleUpon
  • submit to reddit

  • July's Community Calendar

The H Open

The H Security

The H Developer

The H Internet Toolkit