PDA

View Full Version : File Copy/Synchronization with a Slight Twist


anonapon
01-18-2011, 05:01 PM
Greetings,

I'm rather new to Macs, and I'm curious if Automator and/or AppleScripts could help me with a specific backup task I'm trying to set up in 10.6. I'm trying for a one-to-one backup over my network, and what I'd like to do is, when the Mac turns itself on at a particular time every day via scheduler (easy to do, and already set up), it backs up the files on a large Windows volume shared over my local home network onto itself. The rather straightforward parts of this backup are that it would just copy the new and modified files onto itself, and delete files on itself that are no longer on the source. It's essentially synchronizing the destination with the source, which I've seen a good amount of information on, and I don't even need real-time synchronization, just once a day will do, nor do I need earlier versions of files preserved, or an archive created - just straight copies of the files, preserving the folder structure and attributes (date created, date modified), are fine. Once it's done, I'd like the Mac to shut itself off.

The only thing I've been having trouble finding information on is that the destination on the Mac is to be spread over two volumes (actually two external hard drive enclosures spanning the disks inside them into one logical volume each), which are half the size (8TB) of the Windows share source (16TB). The copy would happen in such a way that when the first 8TB Mac volume gets down to a specifiable amount of disk space left (say, 40GB) the remaining file copy/sync/backup happens on the second 8TB volume.

So long as the total size of the files on the Windows source is less than 8TB, only the first Mac volume would have files on it, but when the Windows source gets to 11 TB, for instance, there would be nearly 8TB on the first Mac volume and the remaining 3TB on the second Mac volume.

If there is a script/Automator workflow that would do this, I'd appreciate any help getting it set up. I'm hoping this could be a way to begin to learn how to automate other tasks, and generally increase my efficiency with the Mac, so that I can eventually do this kind of stuff on my own.

As this is my first post, I'd just like to say "Hello Mr./Miss Human Moderator!" I hope us new users are treating you well.

Many thanks.

renaultssoftware
01-18-2011, 05:55 PM
Don't worry, anonapon, your question was very clearly stated. Congrats and welcome!

I'm sure a UNIX way would be the most efficient in this case. You could get the size from the desired backup (I'm not sure what command). If it's smaller than 8TB, just sync it over from one to the other, and in case of the contrary, get about 8TB of data and copy it to one volume and send the rest to the other. This is moderately easy and I'm sure it won't take too much effort. Unfortunately, I'm not the most knowledgeable on this subject and I can only suggest.