Install Duplicity on Linux(CentOS)
Duplicity backs directories by producing encrypted tar-format volumes
and uploading them to a remote or local file server.
Firstly, enable two important repo
Secondly, install Duplicity
$sudo yum install -y duplicity
Finally, Use it.
$duplicity –help
Following is a short tutorial
e.g.
#I already put the keys in master.linuxdict.com, so I don’t need a password here.
$duplicity test/ scp://root@master.linuxdict.com/tmp
GnuPG passphrase:
Local and Remote metadata are synchronized, no sync needed.
Last full backup date: none
No signatures found, switching to full backup.
————–[ Backup Statistics ]————–
StartTime 1269593213.36 (Fri Mar 26 02:46:53 2010)
EndTime 1269593213.67 (Fri Mar 26 02:46:53 2010)
ElapsedTime 0.31 (0.31 seconds)
SourceFiles 3
SourceFileSize 3060258 (2.92 MB)
NewFiles 3
NewFileSize 3060258 (2.92 MB)
DeletedFiles 0
ChangedFiles 0
ChangedFileSize 0 (0 bytes)
ChangedDeltaSize 0 (0 bytes)
DeltaEntries 3
RawDeltaSize 3056162 (2.91 MB)
TotalDestinationSizeChange 3067132 (2.93 MB)
Errors 0
————————————————-
# On master.linuxdict.com
$ls ~/tmp/
duplicity-full.20100326T084637Z.manifest.gpg
duplicity-full.20100326T084637Z.vol1.difftar.gpg
duplicity-full-signatures.20100326T084637Z.sigtar.gpg
…
$file tmp/duplicity-full.20100326T084637Z.vol1.difftar.gpg
tmp/duplicity-full.20100326T084637Z.vol1.difftar.gpg: DOS executable (COM)
# so others can’t easily copy it. 🙂
—
# Other useful command
# backup incrementally
$duplicity incr test/ scp://root@master.linuxdict.com/tmp
# check the files that has been backuped.
$duplicity list-current-files scp://root@master.linuxdict.com/tmp
# Restore all the backup
$duplicity restore scp://root@master.linuxdict.com/tmp
# Restore only the file we need
$duplicity restore –file-to-restore wiki_import-1.1.tgz scp://root@master.linuxdict.com/tmp /root/wiki_import-1.1.tgz
More details:
RTFM 🙂 and http://www.nongnu.org/duplicity/ (offical site)