#1
|
|||
|
|||
Touch a file after backup
Anybody have any suggestions on how to touch a file (the unix command) so that I can look at the backup disk and see when the last backup was done?
I'm now trying to rotate between 2 different backup disks and it would be nice if I could do something like: > date >last_bkup.txt put somehow target the backup drive root. thx |
#2
|
||||
|
||||
You can do that with an after-copy shell script, no?
__________________
--Dave Nanian |
#3
|
|||
|
|||
I pondered that.. Of course you reply forced me to read the manual and I found this buried deep down:
43 When SuperDuper executes the script, it passes it six parameters: 1 The name of the source volume (e.g. Macintosh HD) 2 The mount path of the source volume (e.g. /) 3 The name of the destination volume (e.g. Sandbox) 4 The path of the destination (e.g. /Volumes/Sandbox) 5 The name of the script the user selected (e.g. Copy – all files) 6 The name of the image file being processed, if any. This could be either a source image (if copying from an image to a volume) or a destination image (if copying from a volume to an image), or a post-copy image (selected in the After copy options, below) so I wrote a simple script to touch a file. Previously I looked at the manual contents and didn't see anything about how to use the script functionality. It turns out that the Advanced features don't get a link on the manual. Thanks for the suggestion. |
#4
|
||||
|
||||
Glad to get you started down the path...
__________________
--Dave Nanian |
#5
|
|||
|
|||
Any chance you'd share the script with a not (yet) so unix savvy user?
Thanks Jake |
#6
|
|||
|
|||
Last backup time script
Here is the script, it needs to be chmod'd executable with the following command:
chmod +x script_name do this from a terminal session. This script will write a file with the filename being the time the last backup completed. validate the script works on your system with the following command: perl -wc script_name enjoy, bob --- start script --- #!/usr/bin/perl -w use strict; # # this script is called after a backup is made, it assumes the following arguments are passed: # # When SuperDuper executes the script, it passes it six parameters: # 1 The name of the source volume (e.g. Macintosh HD) # 2 The mount path of the source volume (e.g. /) # 3 The name of the destination volume (e.g. Sandbox) # 4 The path of the destination (e.g. /Volumes/Sandbox) # 5 The name of the script the user selected (e.g. Copy – all files) # 6 The name of the image file being processed, if any. This could be either # a source image (if copying from an image to a volume) or a destination # image (if copying from a volume to an image), or a post-copy image # (selected in the After copy options, below) # # we only really care about the path of the destination. # # get where we are putting the file my $outpath = $ARGV[3]; # get what time it is in a string my $now = localtime; # make the name of the file == the path (where we backup'd to # + the current time. my $fname = "$outpath/$now"; # open the file, complain and exit if it doesn't seem to work. open( FP, ">", $fname ) or die "Unable to open $fname, $!";; # just for the heck of write the timestamp to the file print FP $now; # close the file and we're done close FP; exit 0; # dunno if SuperDuper looks at the exit codes but this is cleaner. --- end script --- |
#7
|
|||
|
|||
Thanks
Sorry, I forgot to thank you for this - very much appreciated!
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
crazy file copy / backup problem | nakris | General | 5 | 02-16-2009 06:23 PM |
Backup fails | redarm | General | 2 | 06-02-2008 01:30 PM |
Backup failure on a certain file | bmat | General | 3 | 09-25-2007 09:06 AM |
(Zero-length) File caused SuperDuper to abort backup | alancfrancis | General | 7 | 08-31-2005 10:42 AM |
File Preventing Successful Backup | michael k | General | 4 | 03-18-2005 10:02 AM |