|Feb 2, 2007, 05:45 AM||#1|
Backup to server
I'm new to AppleScript and I need to know how to backup all files in a folder to a shared network volume.
Can anyone help or point me in the right direction.
I need to find out how to:
- connect to a shared volume on a remote server,
- create a new folder on the shared volume,
- re-name it with the current date (preferrably formatted as YYYY-MM-DD),
- copy the contents of a local folder to it
- delete oldest folder on volume
- un-mount the volume
Any help at all would be very much appreciated.
|Feb 2, 2007, 10:49 AM||#2|
|Feb 7, 2007, 03:51 AM||#4|
The files to be backed up are on a G5 iMac. I thought Applescript was the best way to go but I could be wrong (I'm a beginner here).
I would prefer it if the code mounted the drive IF it's not already mounted, then un-mount it at the end.
Should i be using a shell script instead?
|Feb 8, 2007, 01:05 PM||#5|
Either way, you would have to have the drive "shared" on the G5 side and available. Then, your shell script would:
- Check if the mount point was there (I would mount to /Volumes, as this seems to be the OS X standard...most non-Apple *nix variants use /mnt though), and mount it if its not. this is very simple to do.
- Backup the data. Again, fairly easy depending on what you deem "backup". The easiest would be to simple tar/gzip the contents you want to backup to the newly mounted share. Tar has some options to "tar to STDOUT" or "Untar from STDIN", allowing you to directly send the output of tar to gzip for a single-line TARBall creation.
- Possibly confirm the backup happened, maybe send an alert if a problem is detected.
- Unmount the share
Once the script is written, you could even go so far as to create an Automator script around it to schedule it, or add it to cron, or even just run it manually.
I would suggest getting a cheap book on the Bash shell to accomplish the script, or you can just use Google.
|Thread Tools||Search this Thread|
|thread||Thread Starter||Forum||Replies||Last Post|
|Server/Backup||Wolfman310||Buying Tips and Advice||1||Jan 24, 2014 10:07 AM|
|Media Server? Backup? What is your setup?||rlu929s||Apple TV and Home Theater||34||Jan 21, 2014 03:42 PM|
|Media server and backup questions..?||Cbdboz||Apple TV and Home Theater||11||Nov 20, 2013 02:49 AM|
|OSX Server backup?||kweevuss||Mac OS X Server, Xserve, and Networking||6||Apr 29, 2013 10:56 AM|
|Backup from Windows to Mac server||carlsson||Windows, Linux & Others on the Mac||0||Apr 2, 2013 04:28 AM|
All times are GMT -5. The time now is 05:56 AM.