Two external drives attached to AEBS - possible to mirror them?

Soldato
Joined
26 Aug 2003
Posts
24,288
Hello,

I have an Airport Extreme with a couple of external drives plugged into it.

Is there any way, using carbon copy cloner, super duper or similar, to have a scheduled backup of one drive, to the other?

I'm looking on the CCC FAQ but it's a bit of an odd one to search for. Basically I have stuff on one USB drive that more than one machine uses, hence it being on the AEBS, and I'd just like to have a spare copy of it just in case, because it's not currently backed up. I can manually do it, but a scripted/scheduled solution would be better - if it was directly attached to the Mac I'd just do the USB raid thing or use CCC, but I dunno if it'd work with an AEBS drive - anyone know?

Ta :)
 
You could create a script on your mac to mount each drive, rsync one drive to another and then put it in a cron job to run it periodically.

All of these tools are already available on your mac.
 
Would it be difficult for someone with a pretty limited understanding of the terminal and so on? I suppose what I mean is can I find a web page to tell me almost exactly how to do it :D
 
Google for how to mount smb or afp drives in terminal.

Then Google for how to use rsync and how to create cron jobs.

This is off the top of my head and not tested, but you want something like this

Create two dirs first:
Code:
sudo mkdir /Volumes/disk1
sudo mkdir /Volumes/disk2

Code:
#!/bin/bash
mount_afp afp://user:pass@<ipofape>/volume1 /Volumes/disk1
mount_afp afp://user:pass@<ipofape>/volume2 /Volumes/disk2
rsync -az --size-only /Volumes/disk1/* /Volumes/disk2/.
umount /Volumes/disk1
umount /Volumes/disk2

Dump that somewhere like /usr/bin/syncdrives.sh and do
Code:
chmod 755 /usr/bin/syncdrives.sh

Finally you want to create a cron job
Code:
sudo su -
env EDITOR=nano crontab -e

and paste something to the following effect:
Code:
0 * * * * /usr/bin/syncdrives.sh

Ctrl+x, then Y to save.

That would do it every hour.

Of course, you want to test this on something that isn't important first, so play around with the script and run it manually first: just by typing "/usr/bin/syncdrives.sh".

Like I say, this is all off the top of my head, and you really need to figure out what everything is doing first for yourself. Please don't come running back to me if I've done something wrong and all of your data disappears :P
 
Back
Top Bottom