Shirt Pocket Discussions

Shirt Pocket Discussions (https://www.shirt-pocket.com/forums/index.php)
-   General (https://www.shirt-pocket.com/forums/forumdisplay.php?f=6)
-   -   Date stamp possible ? (https://www.shirt-pocket.com/forums/showthread.php?t=5302)

mmurray 06-03-2009 11:49 PM

Date stamp possible ?
 
This is probably a feature request but perhaps I am missing a trick for doing it. I would like SuperDuper to put a text file with the current date and time in it on the top directory of the copy it has made ? Is that possible ? I have a couple of backups running and it would be handy to know which was the most recent. Alternatively I guess the application itself could story a history and maybe even attach to each history entry the log file for that backup.

Thanks - Michael

dnanian 06-04-2009 07:01 AM

You can write a small shell script to do that kind of thing, Michael, and run it in the "After copy" section of the Advanced tab.

mmurray 06-04-2009 07:10 AM

Quote:

Originally Posted by dnanian (Post 24981)
You can write a small shell script to do that kind of thing, Michael, and run it in the "After copy" section of the Advanced tab.

Ah thanks.

My scripting ability should just about run to that :-)

Regards - Michael

mmurray 06-04-2009 07:26 AM

Dave is there a way of referring to the target disk in the shell script that is being run after the copy ?

Thanks - Michael

dnanian 06-04-2009 07:38 AM

See the User's Guide, Michael - it explains what arguments are provided to the script.

mmurray 06-04-2009 10:16 AM

Quote:

Originally Posted by dnanian (Post 24987)
See the User's Guide, Michael - it explains what arguments are provided to the script.

Thanks. OK the script below seems to work (well once):

Quote:

#! /bin/tcsh -f
#

set target="$4"
set dsfile="$target/DateStamp.txt"
echo "Latest clone was done on `date` " > "${dsfile}"
You end up with a text file called DateStamp on the top level of the volume you are cloning to. In that file is the time of the latest clone in the form:

Quote:

Latest clone was done on Thu Jun 4 23:31:39 CST 2009
Thanks again Dave.

Regards - Michael

PS: Anyone borrowing this script should note that the phrase `a little knowledge is a dangerous thing' was invented in honour of my programming ability :-)

mmurray 06-07-2009 09:28 AM

In case anyone wants it the latest version of my script is

Quote:

#! /bin/tcsh -f
#
set target="$4"
set dsfile="$target/DateStamp.txt"
echo "Latest clone was done on `date`" > "${dsfile}"
echo "Latest clone was done on $target on `date`" >> "/Users/abcde/Documents/CloneLog.txt"
where you need to replace abcde with your username. This version as well as leaving a file called DateStamp.txt on the target disk with the date of the cloning also keeps a file in your user directory in Documents called CloneLog.txt with a list of all the volumes your computer has been cloned to and when. E.g.

Quote:

Latest clone was done on /Volumes/Backup1 on Fri Jun 5 10:58:13 CST 2009
Latest clone was done on /Volumes/Backup2 on Fri Jun 5 11:41:03 CST 2009
Latest clone was done on /Volumes/Backup1 on Sat Jun 6 15:58:13 CST 2009
Michael


All times are GMT -4. The time now is 01:39 AM.

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