Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I need a software or any other way to backup my home directory instantly so that if my data is lost I have another copy over the network.

I have a NAS on my local network and I want to have an exact copy of my machine home directory over there

I don't want a SYNC behavior. What I need is a MIRROR

share|improve this question
add comment

4 Answers

up vote 2 down vote accepted

A simple script using rsync tool could solve your problem. The script is:

while true
do rsync [source-folder] [destination-machine:folder]
sleep 5 

If you want a real-time backup then you can just remove sleep 5 or make it as acomment #sleep 5

To make it autostarted with your user, You can make a launcher then add this launcher to the startup Applications in order to autostart.

Moreover, you can find many other backup tools and other syncronization tools that help you but i just found this script easy to use

share|improve this answer
add comment

As outlined in the previous answers, rsync is the most efficient way for copying files over a network. This however requires you to manually initiate the mirroring process. If you want this to happen automatically like a one-way dropbox you can use lsyncd:

    sudo apt-get install lsyncd
    lsyncd -rsyncssh /home nashostname backup/dir/
share|improve this answer
add comment

Ubuntu 12.04 has a desktop backup application that serves that purpose.

You can search for "backup" in ubuntu dash and set the destination folder in "Storage" tab:

deja-dup storage destination folder options

You may choose FTP, SSH, WebDAV, Windows Share (Samba) or a local folder.

Programs in question are deja-dup and duplicity.

Note: Sorry, this answer seems a bit off-topic since you need a mirrored folder readily available (is this the case?) and deja-dup creates compressed archives. Note that deja-dup allows you to restore specific files from backups (right-click on any file/folder and select "Revert to previous version").

share|improve this answer
add comment

Duplicity is very good and can use rsync as a backend. What I like most about it is the ability to configure filters, so if there are huge files or files of certain extension you don't want mirrored in that directory it's easy to make those adjustments. Note that deja-dup uses duplicity as it's backend and is a real easy way to get started, even creates sensible exclusion filters by default.

I recommend to cron this nightly. Start with a full backup once a week and then do an incremental nightly. See http://www.rsync.net/resources/howto/duplicity.html for good examples.

share|improve this answer
add comment

Your Answer


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