Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to use it to do a nightly "backup" of files from a computer where the files will change several times a day but only want to backup once a night. Is this possible?

share|improve this question

I prefer to use rsync, and to schedule it as a cron job. This command will get it done for you:

rsync -a /path/to/backup /place/to/put/it

I like rsync because it's sole purpose is to intelligently synchronize directories and their contents. Rsync maintains all file attributes, and also copies hidden files. It does not recopy files that have not changed since the last backup. I prefer this because it provides direct and quick access to the copies without any special programs. They are simply copies of my files, in the exact layout as the original. This method will not store previous backups however, so that is something to consider if you care about previous backups. I personally don't want to use the disk space on backup history.

To schedule it on a cron job, open up the crontab like so:

crontab -e

Then add this line:

01 02 * * * rsync -a /path/to/backup /place/to/put/it

This will run the job every night/morning at 2:01 AM. Full instructions here.

share|improve this answer
rsync cannot allow multiple "versions" of backup. we only have the last synced copy! Deja Dup backup can handle multiple versions of backup (i can restore what was yesterday or the day before or last week). – May 2 '13 at 2:31 Yes that is correct. As I mentioned in my answer, rsync does not store previous backups. I prefer this because I would rather use the disk space for something else. In 5 years of keeping backups like that I have never once needed to reference an older backup. Thus, I'd rather use that disk space for my collection of music and books :-D – Freedom_Ben May 2 '13 at 15:14
well in that case, may i suggest Unison. Please refer the new answer for more details. – May 2 '13 at 19:23
If you like rsync, use rsnapshot. Its uses rsync and hardlinks to allow versioning. I use it to sync terrabytes of data on a daily basis – tomodachi May 2 '13 at 20:34
Thanks for the tips guys. rsnapshot looks awesome! – Freedom_Ben May 2 '13 at 22:19

Use "Deja Dup" (also known as "Backup"). Set the "How often to backup" in "Schedule" tab to "Daily"

share|improve this answer

You can use Unison, which is available from the Ubuntu repos. You can install it via software center.

It builds over the rsync, and syncs edits and deletes from multiple places. So if you have data files which are present on multiple machines, then editing files on one machine would give you tough time while syncing in other machine. Multiple edits (to different files) across such server copies are also tough to sync with rsync.

Unison handles all this, and gives you a clean CLI or GUI to work with. Version 2.40.65 recommended.

You must install the same version of unison at both primary(ies) and backup server(s).

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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