--- sludge_scripts/backup.pl 2011/06/22 20:12:58 1.1 +++ sludge_scripts/backup.pl 2011/06/23 13:32:48 1.2 @@ -3,7 +3,7 @@ use strict; use Data::Dumper; -my $VERSION = "\$Id\$"; +my $VERSION = q/$Id: backup.pl,v 1.2 2011/06/23 13:32:48 nick Exp $/; my $REMOTE = "nick\@demandred.dyndns.org"; my $OPTIONS = "-avxz\ -e\ ssh\ --delete"; my $RSYNC = "/usr/bin/rsync"; @@ -47,7 +47,7 @@ foreach my $backup ( keys %DIRS ) my $dest = $BACKUP_DIR . "/" . $backup; my $command = "/usr/bin/rsync $OPTIONS \"$REMOTE:$dir\" $dest"; print "Backing up $REMOTE:$dir to $dest\n$command\n"; - system( "mkdir -p $backup" ); + system( "mkdir -p $dest" ); system( $command ); } }