Shirt Pocket Discussions  
    Home netTunes launchTunes SuperDuper! Buy Now Support Discussions About Shirt Pocket    

Go Back   Shirt Pocket Discussions > SuperDuper! > General

Reply
 
Thread Tools Rate Thread Display Modes
  #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
  #2  
Old 09-27-2006, 12:36 AM
dnanian's Avatar
dnanian dnanian is offline
Administrator
 
Join Date: Apr 2001
Location: Weston, MA
Posts: 14,923
Send a message via AIM to dnanian
We haven't changed the way these scripts are executing -- we're simply calling it... I have no idea why it wouldn't work.

(You would be running authenticated; you're sure that the SVN configuration can be read in the dump line?)
__________________
--Dave Nanian
Reply With Quote
  #3  
Old 09-27-2006, 01:03 PM
nullset nullset is offline
Registered User
 
Join Date: Sep 2006
Posts: 8
Quote:
Originally Posted by dnanian View Post
(You would be running authenticated; you're sure that the SVN configuration can be read in the dump line?)
I'm sure that the SVN configuration can be read in the dump line. If I sudo run the same script from within the terminal the SVN dump works just fine. If I don't sudo before running the script, the dump fails. Honestly what seems to me to be happening is that SD! isn't running as authenticated (like it should) ... the script seems to fail in the same place in SD! as it does when I'm not running as a super user.
Reply With Quote
  #4  
Old 09-27-2006, 01:27 PM
dnanian's Avatar
dnanian dnanian is offline
Administrator
 
Join Date: Apr 2001
Location: Weston, MA
Posts: 14,923
Send a message via AIM to dnanian
It's running authenticated. Try touching a root-owned file to see.
__________________
--Dave Nanian
Reply With Quote
  #5  
Old 09-27-2006, 01:57 PM
nullset nullset is offline
Registered User
 
Join Date: Sep 2006
Posts: 8
Hmmm, that works OK. I'm still completely stumped. When SD! is authenticated it works as the root user, right? What group is it part of? Wheel? Could I be running into a problem if my script is a part of the wrong group?
Reply With Quote
  #6  
Old 09-27-2006, 02:30 PM
dnanian's Avatar
dnanian dnanian is offline
Administrator
 
Join Date: Apr 2001
Location: Weston, MA
Posts: 14,923
Send a message via AIM to dnanian
We're running with straight-up authentication -- basically, like sudo. You won't want to re-suid your script, but I don't think it'll necessarily hurt... I think you might be making assumptions about what home folder you'll get that might mess things up.
__________________
--Dave Nanian
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Booting from backup guruuno General 27 10-16-2009 11:53 PM
Do shell script erroring? Budgie General 1 02-08-2006 04:50 PM
Scheduled Custom Script Uses Wrong Script? Dasman General 1 12-08-2005 01:55 PM
Problems backing up to LaCie 500 gb RichardRipley General 3 11-30-2005 06:12 PM
Error: No space left on device tradervic General 11 06-29-2005 04:50 PM


All times are GMT -4. The time now is 04:37 AM.


Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2024, vBulletin Solutions, Inc.