FreeNAS Integration at rsync.net

Your FreeNAS device already has rsync installed - Integration is easy

 

You can seamlessly enable efficient, automated synchronization of your FreeNAS based system to your rsync.net offsite filesystem.

Any one, or all of, your FreeNAS mount points can be synchronized, and almost all configuration is done through the familiar FreeNAS Web GUI.

rsync.net is happy to provide unlimited, free support for all integration issues arising from ths use of our service with your FreeNAS devices. We support the FreeNAS project and are enthusiast ic about the deployment of these devices by our customers.

 

Creating and Uploading an SSH Key

 

In the web GUI, choose the "Advanced" menu, and then choose the "Command" choice.

In the "Command" textbox, enter this command EXACTLY as shown:

 

ssh-keygen -q -t rsa -f /root/.ssh/id_rsa -N ""

 

Important: That command must be typed in exactly as shown, so please cut and paste, and do make sure to get BOTH of the "" at the end.

Now click the "execute" button. After a few seconds, you will see the command you just ran shown above a now-empty "Command" textbox.

Now log into your FreeNAS device on the CONSOLE. This is NOT the web interface - you need to log into it locally by sitting down in front of the system, or over SSH. You should see a text menu that looks like this:

 

1) Assign Interface
2) Set LAN IP address
3) Reset WebGUI password
4) Reset to factory defaults
5) Ping host
6) Shell
7) Reboot system
8) Shutdown system
9) Install/Upgrade to hard drive/flash device, etc.

 

Press "6" to enter the shell. Immediately upon entering the shell, you should run this command:

 

scp /root/.ssh/id_rsa.pub 123@tv-s001.rsync.net:.ssh/authorized_keys

 

NOTE: Your username is NOT 123, and your rsync.net hostname is NOT tv-s001.rsync.net. Please replace those with the username and rsync.net hostname that were assigned to you in your welcome email.

You will be asked a Yes/No question if you are sure you want to connect - this is normal, just type in the word "Yes" and hit enter. You will then be asked for the password to your rsync.net account - please enter it.

IMPORTANT: Make sure that this command worked by waiting until it completes, then press the UP arrow once to retrieve the command again, and then press enter. You are running the exact same command again, BUT this time you should NOT be asked for your rsync.net password. The file should transfer properly without asking you for a password.

 

Running Your Initial Backup

 

It's not a good idea to schedule your backups before running one manually, to completion. The reason is, if you have a lot of data, or if your network connection is congested, your initial backup may not be complete before the next backup is scheduled to run. You will then have two backups running, competing with each other for access to your files and network connectivity. This is not dangerous, but the operation will grind to a halt.

Therefore, you should run your backup(s) manually before scheduling them. In this document, we will assume that your FreeNAS device has two mount points defined:

 

/mnt/systems
/mnt/mail

 

It is possible to run these manual backups from the web GUI, and you will be shown how just below, but since these are long transfers and it is nice to see some output from the command, and watch it run, we recommend running these initial backups from your FreeNAS console, in the shell.

Once again, log into your FreeNAS device on the CONSOLE, as you did above when you transferred your SSH key to us. This may involve actually sitting down at the computer FreeNAS is installed on.

In the text menu, press "6" to enter the shell. In our example, we would first manually backup our first mount point:

 

/usr/local/bin/rsync -avH --progress /mnt/systems 123@tv-s001.rsync.net:

 

NOTE: Again, substitute your actual username and rsync.net hostname for the examples shown in that command.

NOTE: The trailing ':' at the end of that command IS required. No '/' is needed - please do not add one.

NOTE: You should NOT be asked for a password when you run this command - if you are, you have not properly uploaded your SSH key.

This command, depending on how many files are in that mount point, and how much space they take up, may take hours, or even days to complete. Further, if this command terminates with an error after running for a long period, that is not a problem - simply re-run the command again. The rsync command will pick right up where it left off and continue transferring the contents of that mount point until it is finished, so just keep re-running it until it completes without errors.

In our example, since we have two mount points, we would then run a second rsync command to manually transfer the second mount point:

 

/usr/local/bin/rsync -avH --progress /mnt/mail 123@tv-s001.rsync.net:

 

OPTIONAL: Running the Initial, Manual Backup From the Web GUI

 

We do not recommend this, as it is much more informative to see these commands run from the command shell. However, it is possible to run the initial, manual backup from the web GUI.

Once again, in the web GUI, choose the "Advanced" menu, and then choose the "Command" choice. You would then enter each of the two above rsync commands into the "Command" text box, and click the "Execute" button.

It may take hours for these initial commands to run, and you may not see any meaningful output until they finish.

If this command terminates with an error after running for a long period, that is not a problem - simply re-run the command again. The rsync command will pick right up where it left off and continue transferring the contents of that mount point until it is finished, so just keep re-running it until it completes without errors.

 

Scheduling Your Backups

 

In the Web GUI of your FreeNAS device, choose the "System" menu, then choose the "Advanced" choice.

From the avanced screen, choose the "Cron" tab. You should now be in the "System|Advanced|Cron" menu. Click on the Plus sign to the right to add a new cron command.

The command should be:

 

/usr/local/bin/rsync -avH --progress /mnt/systems 123@tv-s001.rsync.net:

 

You need to type something in for the description. Anything is fine.

For the "Scheduled Time", be sure to choose "0" for the minute and "0" for the hour, and "All" for the other three (days, months, week days).

You can change this schedule later to suit your needs, but for now, running it once per day at midnight (the 0 minute of the 0 hour) is best.

Now click the "Add" button on the bottom. After returning to the Cron menu, be sure to click the "Apply Changes" button.

Again, in our example we have two mount points to back up, so we would repeat the above actions, but with this command instead:

 

/usr/local/bin/rsync -avH --progress /mnt/mail 123@tv-s001.rsync.net:

 

Further, you should choose a different time to run this second job. You may still use "0" for the minute, but perhaps use a "2" or even a "4" for the hour so as to stagger these jobs and relieve both the strain on the FreeNAS device and your network connection.

 

Support

 

If you have any problems with this process, do not hesitate to email support@rsync.net - we will help you immediately, and have you up and running that same day.

 

Click here for Simple Pricing - Or call 619-819-9156 or email info@rsync.net for more information.