User Tools

Site Tools


rsync_example

RSYNC Example

2016



Rsync is a tool in Linux to allow backups, you can backup a local folder to the local machine, or remote folders to remote machines (in any combination)

For my requirements, I want to backup a folder on my WebServer Pi, to a folder on my Backup Pi. Because the WebServer Pi faces the internet, I decided to use the Backup Pi to pull the files from the WebServer Pi, as the Backup Pi is not visible from the internet (so hopefully the whole process is a little more secure).

So lets say the WebServer Pi is 10.0.0.1 and the Backup Pi is 10.0.0.10. Lets also assume both Pi's have the default username and password of pi/raspberry.

  Firstly, on the Backup Pi (10.0.0.10) I need to create a folder on my backup location, 
  for this example we will use
  
  /backup/webserver


  On the WebServer Pi, the files are held in 
  
  /home/Pi


  So from the Backup Pi, open a console and enter:
  
  rsync -avzh pi@10.0.0.1:/home/pi /backup/webserver


If this is the first time the two computers have connected, then you may see a similar error to this one:

  ECDSA key fingerprint is xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:x:xx:xx:xx:xx:xx.
  Are you sure you want to continue connecting (yes/no)? 
  
  Enter Yes to continue
  
  You will then be asked for your password (of the computer you are currently on)



That's it, you should be syncing.

rsync_example.txt · Last modified: 2017/02/28 18:00 (external edit)