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 08-29-2006, 06:57 PM
fatshark fatshark is offline
Registered User
 
Join Date: Aug 2006
Posts: 8
Shell/perl scripting and permissions? FTP

I need to run a shell script to FTP the completed sparseimage backup to an offsite machine (no I can't mount the drive). I'm a reasonable perl coder and have a script that - from the command line - does everything I need. However, when called from SD it dies with an error buried deep within the Net::FTP module code.

Since a simple script that just dumps environment variables works fine when called from SD I suspect it's a permissions problem on the perl modules used. For the perl-savvy amongst you, I can 'use Net::FTP' perfectly well ... so the script can find the correct module. However, creation of the $ftp object ...

$ftp = Net::FTP->new('ip' etc etc);

doesn't even die gracefully, just fails horribly with a cryptic error. Any suggestions? From the ownership of the log files created during debugging (or rather, not debugging) this script it looks as though SD runs as root.

As an aside, are there other users who have a different solution for the same problem - applescript or bash perhaps?

Thanks
David
Reply With Quote
  #2  
Old 08-29-2006, 11:15 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
You're running authenticated, David, so perhaps that's causing problems? Have you tried sudoing to your own UID?

Also, if this is run as a post-copy script (in Advanced), the sparse image is still mounted... that might be causing problems, too.
__________________
--Dave Nanian
Reply With Quote
  #3  
Old 11-16-2006, 03:25 AM
fatshark fatshark is offline
Registered User
 
Join Date: Aug 2006
Posts: 8
Finally had time to re-visit this ... yes, it's the fact that the drive is still mounted I think. I'm sure I've seen a thread that points to a script that runs upon completion ... i.e. after SuperDuper! unmounts the disk image and is about to exit. However, I can't find it anywhere.

Any pointers?

Does anyone have an example script that FTP's the completed .dmg to another machine. I've made the mistake of investing in a TeraStation NAS with a crippled implementation of Samba (I think that's the culprit) that has a 2Gb file limit. Backing up to the drive isn't an option - I have to backup, FTP and then delete. Urgh!

Many thanks
David
Reply With Quote
  #4  
Old 11-16-2006, 10:41 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
Are you sure that it's Samba that's the problem here? The Buffalo units have bad AFP implementations that have 2GB file limits, but SMB should work just fine, albeit slowly (the Buffalos are slow-slow-slow)...
__________________
--Dave Nanian
Reply With Quote
  #5  
Old 11-16-2006, 11:49 AM
fatshark fatshark is offline
Registered User
 
Join Date: Aug 2006
Posts: 8
You're right ... if they go any slower they'll become extinct. You're also correct ... mounting a disk with afp://123.456.789.012/ works, but I can't see any files larger than 2Gb on the drive. However, doing the same thing but using smb://ip works and I can see the files just fine. This has been bugging me for ages (and I'd even looked on the Terastation forums) - many thanks !

So, having solved that, can you point me to the 'just before SuperDuper! exits, after it's unmounted the disk image' script? (if my memory is correct that there is such a thing).

Many thanks for help with SuperDuper! and the NAS box.
David
Reply With Quote
  #6  
Old 11-16-2006, 12:03 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
You shouldn't need to do this, David, since you can now copy directly to the drive with SMB.

But, if you must, you have two choices. Put your own script in the background and sleep 20 seconds or so before doing anything (or watch for the unmount), or you can modify the applescript... the former is likely going to be easier!
__________________
--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


All times are GMT -4. The time now is 10:20 AM.


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