rdiff-backup seems like a good tool to do it. I used to use the following incremental backup that uses rsync and is written in perl (Ben forwarded it my way):
- Code: Select all
#!/usr/bin/perl -w
use strict;
my $host="kamil\@spl64_0";
my $bkuppath="/home/kamil/rsync/backup_new/backup";
my $local="/path_to_backup/";
my $n;
my $N=10;
print("deleting backup.$N ...\n");
system("ssh $host rm -rf $bkuppath.$N");
for($n=$N-1; $n>0; $n--)
{
print("copying backup.$n ...\n");
system("ssh $host mv $bkuppath.$n $bkuppath.".($n+1));
}
print("copying backup.current ...\n");
system("ssh $host cp -al $bkuppath.current $bkuppath.1");
print("rsync backup.current ...\n");
system("rsync -vaL -e ssh --delete $local $host:$bkuppath.current");
however I dont bother making incremental backups anymore... I just use rsync for full backups once a week
- Code: Select all
rsync -vae ssh --delete /path_to_backup user@spl2:/storage_on_server
if you really want to use a truly incremental approach, then use git, svn or cvs
