This is a personal and professional blog of a Network Administrator's/Avid Gamer's knowledge and passions in Minneapolis.
I'm always looking to improve my skill set, and even more so I enjoy passing that knowledge along to others about my craft.
I always feel like IT limits what people do, so I aspire to enable technology, and explain complex things in simple terms.
More

duplicity for ubuntu- easy as pie encrypted backups.

For backups, and a lot of other system administration things, it’s always good to keep things simple. Duplicity is a program that can do backups and restores with encryption, and its fairly automated once you set it up. I’m using it on some ubuntu servers to do backups to our windows based backup server. I really appreciate the great documentation the ubuntu community does. You can check out that writeup here.

Here is my rediculously simple script to do the backup every night, and do a full backup every week, and delete files older than 14 days.

root@hermes:/*****/*****$ cat backup.sh

#https://help.ubuntu.com/community/DuplicityBackupHowto

#password for files

export PASSPHRASE=************

#ftp password

export FTP_PASSWORD=***********

#command to run the backup

duplicity /***/*** ftp://*******@********* –full-if-older-than 7D –time-separator=’_’

#backup cleanup older than 14 days.

duplicity remove-older-than 14D ftp://********@********

#script cleanup

unset PASSPHRASE

unset FTP_PASSWORD

#exit 0

And here is some output.

root@hermes:/*****/*****/$ sudo ./backup.sh

————–[ Backup Statistics ]————–

StartTime 1224268918.23 (Fri Oct 17 13:41:58 2008)

EndTime 1224268952.46 (Fri Oct 17 13:42:32 2008)

ElapsedTime 34.23 (34.23 seconds)

SourceFiles 135072

SourceFileSize 8954695338 (8.34 GB)

NewFiles 1

NewFileSize 4096 (4.00 KB)

DeletedFiles 0

ChangedFiles 1

ChangedFileSize 404 (404 bytes)

ChangedDeltaSize 0 (0 bytes)

DeltaEntries 2

RawDeltaSize 412 (412 bytes)

TotalDestinationSizeChange 692 (692 bytes)

Errors 0

————————————————-

Cool huh?

Tags: , , ,

Filed under:linux

Leave a Reply

You must be logged in to post a comment.