Rsync backup to USB disk

Rsync is arguably my favourite protocol for backups. Whilst it is slow for full backups. It’s a great protocol for incremental backups. It compares files on the source and destination and only makes incremental changes to files. So if you have a 1GB file and add 1MB only 1MB needs to be backed up. The time taken to do the necessary calculations can make Rsync appear deceptively slower than it really is. There are some great guides for backing up a ReadyNAS to another ReadyNAS using Rsync e.g. Using Rsync for NAS-to-NAS Backups and Setting up Rsync over SSH but you can also use Rsync when backing up to a USB disk attached to the ReadyNAS!

Here’s what you need to do:

First do a full USB backup normally using Frontview backup.

Then:

1. Under Services > Standard File Protocols turn Rsync on.
2. Go to Volumes > USB Storage (if not found here the settings for the USB drive will be under Shares > Share Listing) and turn on Rsync for the USB drive and set the permissions.
3. Go to Backup > Backup Listing, and open a backup job’s properties to edit it.
4. Change the backup job properties to use Rsync. I can’t remember whether 127.0.0.1 (localhost) works. If it doesn’t work you can try the static IP address of the NAS.
5. Specify the path. This will be the name of the USB HDD e.g. USB_HDD_1 or perhaps USB_HDD_1/foldername
6. Press Test Connection to make sure you have the backup job settings correct.
7. If you want the backup to be an exact mirror of the source i.e. wipe the USB HDD (or folder inside that if specified), then make sure that the “Remove deleted files…” option is checked.
8. Check the rest of the settings and make appropriate changes (if any) then run the backup job.

Category: Guides 20 comments »

20 Responses to “Rsync backup to USB disk”

  1. Jason Harrison

    If you want to copy the entire ReadyNas, including the TimeMachine share you need to set the destination USB drive to be accessed by Rsync. An Rsync server can only access exported modules, which doesn’t include C: or the TimeMachine share.

    Here are the steps to backup your entire ReadyNas (rather than just one share) to an attached USB drive:

    1. Under Services > Standard File Protocols turn Rsync on.

    2. Go to Volumes > USB Storage (if not found here the settings for the USB drive will be under Shares > Share Listing) and turn on Rsync for the USB drive and set the permissions. You may also want to set the Rsync login and password.

    3. Go to Backup > Backup Listing, and open a backup job’s properties to edit it. Or add a Backup Job.

    4. Set the Backup Source settings. Select: “Volume: C” from the menu. Leave blank the Host, Path, Login, and Password fields.

    5. Set the Backup Destination settings.
    Select “Remote: Rsync Server”
    Set Host to localhost
    Path is the Rsync exported module of the attached USB drive. Something like USB_HDD_2. It will be listed in the menu of possible destination types/locations as “Share: USB_HDD_2″. Just copy that share name into the Path field.
    Login and Password as you set in Step 2.

    6. Press Test Connection to make sure you have the backup job settings correct.

    7. If you want the backup to be an exact mirror of the source i.e. wipe the USB HDD (or folder inside that if specified), then make sure that the “Remove deleted files on target” option is checked.

    8. Check the rest of the settings and make appropriate changes (if any) then run the backup job.

    It is possible that the Test Connection button will report that the connection works, however the backup will fail if the Path on the Rsync server (the Rsync exported module name) is not specified or correct. Test the backup and check the logs to make sure you have everything working.

    To get a list of your ReadyNas Rsync modules, execute from the command line (terminal, etc) the command:
    % rsync rsync://USER@IPADDRESS

  2. deko220

    How has this configuration been working for you? Have you tested a restore from it? I’m curious if it is a “supported” configuration as far as Netgear’s concerned.

    Is it safe to assume that my selection in the “Schedule Full Backup” drop-down list (in Step 4 of Backup > Edit Backup Jobs – First time, Every week, whatever) will have no effect on the backup job when “Remote: Rsync Server” is selected as the backup destination in Step 2?

  3. mdgm

    deko220, thanks for commenting and asking some questions.

    This works fine for me. I haven’t tested a restore from it but don’t see why it wouldn’t work. This doesn’t involve any hacks and is done completely via Frontview. I would expect it would be supported. In fact if backing up to a FAT32/NTFS formatted drive some may find it works better than the normal method as Rsync has a checkbox to enable FAT32 compatibility mode.

    I don’t recommend doing regular full backups when using Rsync. Rsync will compare the source and the destination and ensure that they match. If you do a full backup using Rsync it’ll take a long time. That’s why I recommend doing a USB backup as one normally would in Frontview then changing to using Rsync.

    If you still want to do regular full backups then my advice would be to not use Rsync and just stick to the normal Frontview method.

  4. Stephen

    Hi,

    A real newbie here…. You have prepared a great resource here, thanks.

    A quick question: I am wishing to backup my Duo (2x 500Gb) to a USB connected JBOD unit ( total 1Gb capacity), before I upgrade the Duo to 2Gb HDDs.

    Is Rsync the most the best way to do this? I don’t know, but does Rsync allow you to verify that the backup is complete and error free?

    I would like to backup my NAS on a regular basis to my JBOD; again is Rsync the best tool to do this – I would prefer an automated solution.

    Cheers,

    Stephen

  5. mdgm

    Thanks for the question Stephen.

    I’m not sure whether or not that JBOD unit will be properly recognised or not. if it is then hopefully it’ll work fine.

    I recommend formatting USB disks to use EXT3 and also enabling fast USB writes

    I recommend doing an ordinary USB backup using Frontview then changing to use Rsync. Rsync is slow for full backups, but it’s great for incrementals and verifying a full backup

    Rsync is good to use and I recommend it.

  6. the_sole

    hi there, very interesting article, i have a question – no idea if it’s possible but, could you set up rsync to back over a vpn to a usb disk (attached to a readynas)?
    basically myself and a colleague both had a readynas and are looking for remote backup solutions, but it would be an idea if i could have a usb disk attached to my nas for his back up and vice versa
    with the amount of data we each have it would kind of need to get straight to the usb…
    any ideas?

  7. mdgm

    Yes the_sole you should be able to. It would be better to backup to internal disks in the ReadyNAS in my opinion.

  8. the_r_sole

    no doubt that would be best but it’s not really practical for us in this situation – it would also (hopefully) save a lot of bandwidth as we could do the first big back up direct then only incramentals over the vpn – if i can figure it out!

  9. mdgm

    If you could have the ReadyNAS and USB disk at the same location as the source device for the initial backup that would be best.

    Otherwise you’ll need to seed the backup which is more complex (if using Frontview backup you’ll need to do a dummy full backup e.g. of single file to test share then change backup job properties. As full backup has been done, NAS will attempt to do an incremental backup on next run if set to full backup first time only).

  10. Mark Mason

    I followed the instruction. Rsync did a full backup even though I ran a backup using FrontView prior to running the Rsync. I programmed the front button to run the backup routine. The selections in FrontView regarding the backup required choosing one of the following, none of which did I want: –Full backup first time only, Full backup once time per week, Full backup once every two weeks, Full backup once every three weeks, and Full backup once every four weeks.—

    No option for no full backups, or full backup up every 8 weeks. Once per month is too frequent.

    Also, what happens if the backup drive is full?

  11. mdgm

    If you select “full backup first time only” it will only do a full backup the very first time the backup job is run. After that it will do incrementals. If the backup drive becomes full the backup job will fail. You need to make sure you’re backing up an appropriate amount of data considering the backup drive you are using.

  12. Mark Mason

    I ran an initial FrontView backup, then switched to Rsync. I’m now into more than twelve hours of the first Rsync backup. I am trying to get access to the backup logs but the NAS is so busy that the log window after several minutes does not display. Got a small window notice stating that the backup is taking a long time and may be stalled. Any suggestions how to get out of this? Backup amount of data files is not more than one gig.

  13. Mark Mason

    Could my problem be related to this?
    http://www.readynas.com/forum/viewtopic.php?f=31&t=59630

    Maybe a bug?

    I am using localhost for the host, and USB_HDD_1 for the path, also, as noted in the instructions above.

  14. mdgm

    Are you able to cancel the backup job then view its log?

    Have you enabled root SSH access? If you have SSH access you could SSH in and check the backup job progress.

  15. AL

    Thanks for this guide. Could not backup the Duo to an external drive no matter what I tried. After a year of successful backups started to get errors and fails. ” Error encountered copying data from source path ==> /USB_HDD_1//readynas due to unknown reason. Please see log.”

    The Rsync is working but concerned that if I switch back to a normal backup (incremental) it will fail again.

  16. Graham

    Ok, so…I setup my Duo V1 to backup to an external drive on Saturday. However, the lights are still vigorously flashing on the ReadyNas 4 days later. Can I assume something went wrong or does an initial backup to an external drive normally take this long via RSync? (It’s backing up 2tb NAS which is only 23% full)

  17. mdgm

    Rsync is CPU intensive and your NaS has a slow CPU. Did this job complete?

  18. silvo

    Thank you for the helpfull blog.
    Everything works fine.

    Best regards from germany!
    Silvo

  19. steve

    ’1. Under Services > Standard File Protocols turn Rsync on.’

    there’s no such option on the front page once I’m logged on

  20. mdgm

    What ReadyNAS model do you have and what firmware version? These instructions are for RAIDiator 4 though the process is similar for newer OSes


Leave a Reply



Why ask?

Back to top