root/branches/newmole/scripts/svnbackup.pl
| Revision 341, 1.3 kB (checked in by gary, 2 years ago) | |
|---|---|
|
|
| Line | |
|---|---|
| 1 | #!perl -w |
| 2 | # in above -w turns on some warnings |
| 3 | |
| 4 | # perl script to back up the cloudy source files onto a different computer |
| 5 | # this is automatically executed once per week, early Saturday morning |
| 6 | # files go to cdrw_dir which should be an accessible cdrw drive, |
| 7 | # and also to out_dir |
| 8 | |
| 9 | # bring in the perl module that includes copy |
| 10 | use File::Copy; |
| 11 | |
| 12 | # the cluster disk drive where the repost live, we will back this up |
| 13 | $c = "u"; |
| 14 | # location of repose on cluseter |
| 15 | $repo = "$c:/svn/cloudy"; |
| 16 | |
| 17 | # this is the letter of the cdrw drive on the network |
| 18 | # this now (mid '05) is on thunder |
| 19 | # on 05 oct 01 free space on cloudy_bk was 664 mb full space 703mb |
| 20 | # $cdrw_dir = "j:/"; |
| 21 | |
| 22 | # this is the large raid drive on lightning |
| 23 | $raid_drive = "c:/storage/backup/svn/"; |
| 24 | |
| 25 | # get current time and date |
| 26 | ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = |
| 27 | gmtime(time); |
| 28 | # create name for dump file |
| 29 | $dumpfile = "$raid_drive"."$year"."$mon"."$mday".".svn" ; |
| 30 | |
| 31 | # do the dump into the local file |
| 32 | system( "svnadmin dump $repo > $dumpfile " ); |
| 33 | |
| 34 | # compress the puppy |
| 35 | system("gzip $dumpfile " ); |
| 36 | |
| 37 | # copy it to raid drive |
| 38 | #copy( "$dumpfile".".gz" , "$raid_drive"."$dumpfile"."gz" ); |
| 39 | |
| 40 | # copy to cd |
| 41 | # copy( "$dumpfile".".gz" , "$cdrw_dir"."$dumpfile.gz" ); |
| 42 | |
| 43 | #unlink( "$dumpfile".".gz" ); |
| 44 | |
| 45 | |
| 46 |
Note: See TracBrowser
for help on using the browser.
