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 04-22-2008, 12:47 AM
Harry Cover Harry Cover is offline
Registered User
 
Join Date: Dec 2005
Posts: 64
Shell Script before Backup: time limit ?

Hello Dave,

I have a smart BU schedule (cloning HD A -> B), starting after an Applescript (advanced Shell script before BU option).
This script copies a large folder to HD A (folder copy HD C -> A).
I have tested it but it fails.

What could have happened ?
Is there a time limit SD can wait, before starting its job ?
In that case, what is the time limit ?
What could be the solution ?

Thanks in advance.
Regards?
Reply With Quote
  #2  
Old 04-22-2008, 09:31 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
Fails how? I don't really have much information here...
__________________
--Dave Nanian
Reply With Quote
  #3  
Old 04-22-2008, 02:31 PM
Harry Cover Harry Cover is offline
Registered User
 
Join Date: Dec 2005
Posts: 64
Quote:
Originally Posted by dnanian View Post
Fails how? I don't really have much information here...
Sorry.

More details:
1 - The preliminary copy (Applescript) did not complete. Don't ask me why...
2 - SD did not start its own smartBU.
Reply With Quote
  #4  
Old 04-22-2008, 04: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
I'd need to see the log, Harry; can you send it into the support email address?
__________________
--Dave Nanian
Reply With Quote
  #5  
Old 04-23-2008, 03:21 AM
Harry Cover Harry Cover is offline
Registered User
 
Join Date: Dec 2005
Posts: 64
Quote:
Originally Posted by dnanian View Post
I'd need to see the log, Harry; can you send it into the support email address?
OK, Dave.

I'll do that as soon as possible.

Alternatively, I could independantly schedule the Applescript initial copy, with Cron (outside SD), and then schedule SD secondary copy script, after the initial AS completion.

Thanks for your help.
Regards.
Reply With Quote
  #6  
Old 04-23-2008, 08:35 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
Sure, you can do that.
__________________
--Dave Nanian
Reply With Quote
  #7  
Old 04-23-2008, 01:25 PM
Harry Cover Harry Cover is offline
Registered User
 
Join Date: Dec 2005
Posts: 64
Quote:
Originally Posted by dnanian View Post
I'd need to see the log, Harry; can you send it into the support email address?
Here comes the error log:
<| 07:07:24 PM | Error | sh: line 1: /Users/Medecins/Documents/AppleScripts perso/Satur.SAUV 1.0.scpt: Permission denied>

Today no copy task was performed.
Neither the Applescrit one, nor the SD one...

Thanks for your superb support, Dave.
Reply With Quote
  #8  
Old 04-23-2008, 03:20 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
OK. That's not really a shell script. You need to create a shell script that runs that -- e.g:

Code:
#!/bin/sh
osascript "/Users/Medecins/Documents/AppleScripts perso/Satur.SAUV 1.0.scpt"
__________________
--Dave Nanian
Reply With Quote
  #9  
Old 04-23-2008, 03:33 PM
Harry Cover Harry Cover is offline
Registered User
 
Join Date: Dec 2005
Posts: 64
Great !
I will test that tomorrow.

I apologize.
Now, I know there is a différence between a simple AS and a shell script.

Thanks again.
Reply With Quote
  #10  
Old 04-25-2008, 12:20 PM
Harry Cover Harry Cover is offline
Registered User
 
Join Date: Dec 2005
Posts: 64
My problem is not solved.

If I am in the Terminal:

---
osascript "/Users/Medecins/Documents/AS.perso/Sat.BU.scpt"
---

The job is perfectly done.

Now, if I am in SD and launch the shell script (before a SD BU option):

---
#!/bin/sh
osascript "/Users/Medecins/Documents/AS.perso/Sat.BU.scpt"
---

SD stops when launching the shell script.

Log:
----
| Error | sh: line 1: /Users/Medecins/Documents/AS.perso/TShirtBU: Permission denied
----

Any hint ?
Thanks in advance.
Reply With Quote
  #11  
Old 04-25-2008, 01:09 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 need to set the script permissions to allow execute:

chmod +x the-file-name
__________________
--Dave Nanian
Reply With Quote
  #12  
Old 04-25-2008, 02:39 PM
Harry Cover Harry Cover is offline
Registered User
 
Join Date: Dec 2005
Posts: 64
Does the script become:

---
#!/bin/sh
osascript "/Users/Medecins/Documents/AS.perso/Sat.BU.scpt"
chmod +x "Sat.BU.scpt"
---

As you can see I am real shell script newbie...
Sorry and thanks agian.
Reply With Quote
  #13  
Old 04-25-2008, 03:01 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
No, the "chmod" is done in Terminal, to give the script file execution permission. This is the script you've written (hopefully as a plain text file), not the applescript.
__________________
--Dave Nanian
Reply With Quote
  #14  
Old 04-26-2008, 02:20 AM
Harry Cover Harry Cover is offline
Registered User
 
Join Date: Dec 2005
Posts: 64
Quote:
Originally Posted by dnanian View Post
No, the "chmod" is done in Terminal, to give the script file execution permission. This is the script you've written (hopefully as a plain text file), not the applescript.
As I previously said.
I have no issue in Terminal, even without the "chmod".

The issue only occurs when SD reads the shell script (->permission denied).

I do not knom if this permission problem has to be settled in the shell script or the Applescript. It seems it is rather a shell sript problem, rather than an Applescript one.

Alternatevely, I could write a pure vanilla shell script, using the "rsync" command, but I am afraid of other new scripting issues.

Any hint ?
Thanks in avance.
Reply With Quote
  #15  
Old 04-26-2008, 09:37 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
It must not be readable or executable. So:

chmod +rw /Users/Medecins/Documents/AS.perso/TShirtBU
__________________
--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
alternating backup snoopy67 General 11 04-04-2009 05:14 PM
Server drive won't mount after backup rhennosy General 1 11-09-2007 03:49 PM
Unmount USB drive via Shell Script after Backup? supesguy General 0 11-06-2007 03:07 PM
Error: No space left on device tradervic General 11 06-29-2005 04:50 PM
Smart Backup Error bill s General 20 02-04-2005 09:46 AM


All times are GMT -4. The time now is 08:03 PM.


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