View Single Post
  #1  
Old 09-26-2006, 07:43 PM
nullset nullset is offline
Registered User
 
Join Date: Sep 2006
Posts: 8
Problems with Subversion script

Ever since the latest update to SD! I've been having problems getting my subversion backup scripts to run. Both worked fine before the update, and now neither works. I've even tried a different set of shell scripts, but to no avail.

=== BEGIN SCRIPT ===

#!/usr/bin/perl -w
#
# Perform a weekly backup of a Subversion repository,
# logging the most-recently-backed-up revision so an
# incremental script can be run other days.
$svn_repos = "/path/to/svn";
$backups_dir = "/path/to/svn-backup";
$next_backup_file = "weekly-full-backup." . `date +%Y%m%d`;
$youngest = `/usr/local/bin/svnlook youngest $svn_repos`;
chomp $youngest;
print "Backing up to revision $youngest\n";
`/usr/local/bin/svnadmin dump $svn_repos > $backups_dir/$next_backup_file`;
print "Compressing dump file...\n";
print `gzip -9 $backups_dir/$next_backup_file`;
open(LOG, ">$backups_dir/last_backed_up");
print LOG $youngest;
close LOG;

=== END SCRIPT ===

The script works from the command line if I'm authenticated as root, but I can't seem to get it to work under SD!

I've got the script set to execute (permissions of -rws--x--x), I've tried setting the SUID to both me and to the root, and every time SD! will fail with an error "Error | * Dumped revision 0." Because the error message isn't very descriptive I can only guess at what it means, but I've spent far too many hours now trying to sort it out on my own.

Can anyone help, or at least point me in a new direction?
Reply With Quote