I'm new to Linux so apologize in advance for the basic question. I have two drives installed in this machine. It is essentially poor man's RAID - the second drive is a copy of the first. There is a very small app and database that is a folder called /home/xxx. I want to copy the contents of this folder from the first drive to the second drive on a schedule say once an hour.

In Windows, I would use something like SyncToy to do this and it would be very easy to setup. I'm assuming I can do this easily in Ubuntu as well.

This machine recently failed and having the backup disk really saved our butts. However, I didn't set up the backup. I think it just used the built-in backup software but I have no idea how to tell it to copy to a different drive.



Set up a script (like a BAT file in Windows) that issues an rsync command. The rsync command will synchronize disk 2 with disk 1 (and not the other way around). Make this script executable (with the chmod command) and test it. Open your cron file (crontab -e) and schedule your rsync script to run at every hour.

You could put the rsync command in the cron file directly, but I prefer to have cron call a script so you can easily add more commands if necessary.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.