User Tools

Site Tools


efficient_backups_with_rsnapshot

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
efficient_backups_with_rsnapshot [2010/07/12 06:02]
tkbletsc
efficient_backups_with_rsnapshot [2010/07/12 06:04] (current)
tkbletsc
Line 20: Line 20:
  
 use Socket; use Socket;
-use constant LOGFILE => 'rrsync.log';+use constant LOGFILE => '/home/tkbletsc/rrsync.log';
 my $Usage = <<EOM; my $Usage = <<EOM;
 Use 'command="$0 [-ro] subdir"' Use 'command="$0 [-ro] subdir"'
Line 45: Line 45:
  
 my $dir = $requested_target; my $dir = $requested_target;
-$dir =~ tr|-_/a-zA-Z0-9.,:@|_|c;        # Don't allow ;|][}{*?+$dir =~ tr|-~\\ _/a-zA-Z0-9.,:@|_|c;    # Don't allow ;|][}{*?
 $dir =~ s%/\.\.(?=/)%__%g;              # Don't allow foo/../../etc $dir =~ s%/\.\.(?=/)%__%g;              # Don't allow foo/../../etc
  
Line 66: Line 66:
   $forced = 1;   $forced = 1;
 } }
 +
 +$target =~ s#^//#/#; # program is dumb and sets root to '//' sometimes, which confuses windows/cygwin hosts into looking for a share
  
 if (-f LOGFILE and open LOG,'>>',LOGFILE) { if (-f LOGFILE and open LOG,'>>',LOGFILE) {
efficient_backups_with_rsnapshot.txt ยท Last modified: 2010/07/12 06:04 by tkbletsc