Backup
Redundancy in the form of RAID 6 and snapshots don't reduce the need for good backups. I chose to backup the RN204 to a set of external 2.5" USB 3 4 TB drives. We have one for each day. Last night's goes offsite at the end of the day. These drives are all ext4 formatted so that the files retain the permissions. If the NAS goes down, I can plug the external drive into a windows box and read it with https://www.diskinternals.com/linux-reader/.
The only way to get ReadyNAS OS to copy files across and also delete files on the backup drive that have been deleted on the source drive is to use RSync. The other backup methods offered do not delete files on the backup drive. They just add new files and modify changed files. That is useless for a backup in my opinion. I want my backup to match the source.
I setup a directory on the USB drive called BACKUP. The backup for each share will go under this directory.
I setup a directory on the USB drive called BACKUP. The backup for each share will go under this directory.
There is a trick to setting up RSync as a backup method. You have to set the left side of the backup dialog to be "remote". This really means use the RSync process on the RN204. The IP of the "remote" is 127.0.0.1.
The destination of the backup is one of the USB 3 ports. In my case I chose the upper USB 3 port. That is always the destination of my backup, no matter what drive is attached. To select the USB port hit "Browse" on the right side of the dialog and navigate to the USB port you desire using the navigator on the left side of the dialog.
The path to the backup drive folder needs to be filled in. Since I use a BACKUP directory to hold each share's backup mine look like this:
Hit Next and you will be able to schedule the backup. If you have multiple backups scheduled at the same time, they will run in succession from the top of the list to the bottom of the list of backups you have scheduled. There is no need to try to guess how long each one takes and schedule it according to that. Since I want my backups to run at midnight, I set all of them to start at 00:05. We only want a full backup the first time for RSync. I have an email sent upon completion of the backup no matter if there were errors or not.
Hit Finish.
I need to change one thing for the backup setup. The backup should remove any files on the destination (backup) drive that have been removed from the NAS. Select the backup job and pick settings. Pick Advanced. Check "Remove deleted files on target" and ok this.
Running through each tab in the settings for the new backup job you should see this:
Rsync is amazingly slow at copying files. I had 130GB of files to copy. Using a linux cp they copied in a couple of hours. The same thing using RSync took almost a day. On the other hand Rsync is incredibly fast at incremental backups since it only has to copy the differences.
Hit Finish.
I need to change one thing for the backup setup. The backup should remove any files on the destination (backup) drive that have been removed from the NAS. Select the backup job and pick settings. Pick Advanced. Check "Remove deleted files on target" and ok this.
Running through each tab in the settings for the new backup job you should see this:
Rsync is amazingly slow at copying files. I had 130GB of files to copy. Using a linux cp they copied in a couple of hours. The same thing using RSync took almost a day. On the other hand Rsync is incredibly fast at incremental backups since it only has to copy the differences.
The backup setup forces you to schedule a complete backup the first time. Seemingly you are doomed to excessively long first backups due to the poor speed of RSync. But there is a trick if you have a fresh share that has not been populated with data yet. Select and run the RSync backup before you populate the share with any files. Since there is nothing to copy Rsync will complete in a couple of seconds. Select and disable the backup from the schedule tab on the backup properties. Now populate your share with files. Next copy the files to the backup drive, preferably with a linux cp -R --preserve so that all of the attributes of the files on the backup drive are identical to the source. But I have also been successful with a windows drag and drop copy. Finally select and re-enable the backup. Since the files are already on the backup drive, Rsync will deal with the differences only and run quickly.
A couple of things to note:
SSH into the NAS uses root as the master login name, not admin like the dashboard does. But the passwords are the same.
USB drives are mounted in the /media directory of the NAS.
A couple of things to note:
SSH into the NAS uses root as the master login name, not admin like the dashboard does. But the passwords are the same.
USB drives are mounted in the /media directory of the NAS.
To populate the set of external drives, I plugged one good backup drive into a USB port. Then I plugged the blank drive into another USB port. I used a linux "cp -R --preserve /media/<USB source drive> /media/<USB destination drive>" on the RN204 to copy the files from the good drive to the blank drive. Then I unmounted both USB drive (eject from the dashboard) and plugged the destination drive into the USB port that is designated for the nightly backups. Rsync had no clue the drives had been swapped out and dutifully performed its backup.
No comments:
Post a Comment