How to backup your files to NAS western digital

2 minute read

dist files

Photo by Markus Spiske on Unsplash

I decided to write this post to share how to backup files into a western digital NAS drive.

Avoid having a single point of failure

It’s good to practice data redundancy. In the same way that you don’t have a single server to handle all the traffic and you have more than one just in case that one of them is not available, the same happens with data.

You should not have a single point of failure (SPOF)

The mean time to failure of a hard drive is 5 years so it’s not a bad idea to think about copying your files into another destination.

Copying files manually is not a good idea

One could think to just copy files from location A to location B, but if the amount of data that you have is big every time that you add, remove or rename a file in A you will have to copy everything from A to B replacing all the files.

This is not optimal if you have just removed a single file for example or you have added a new file.

Rsync command to backup files

Here is when rsync program comes into play. With this program, we can synchronize files from location A into location B, and we can use SSH to transfer securely files from location A to location B over the network.

Enable SSH in NAS western digital

Now that we know which command we need to use, we have to enable SSH in western digital NAS to be able to transfer files over the network.

We have to go to the following URL to access the western digital NAS user interface.


In the western digital UI we have to go to Configuration > Network > and enable SSH, which by default is disabled.

dist files

Now we are able to use rsync to copy our files from one location to another. In the following command, we are using rsync telling that we want to back up the pictures folder into a backup_pictures folder on the western digital IP address.

Note that you should adapt the IP internal address to the one that your NAS device is using in your local network. Also, we are using the sshd user that western Digital enables when we open SSH.

rsync -r pictures/ sshd@{internal_ip_where_is_your_nas}:backup_pictures

If you want to learn more about rsync command you can check out the following tutorial from Digital Ocean


It’s a great idea to backup your files to be ready for any problem that may arise in your disk taking into account that the meantime to failure of disks is 5 years. In this post, we have seen how to use rsync to synchronize files from location A to location B using SSH.

I won't give your address to anyone else, won't send you any spam, and you can unsubscribe at any time.
Disclaimer: Opinions are my own and not the views of my employer