Using rsync to backup a server

Server backups doesn’t need to be done by a third party. With root access to the server, this how-to will show the fastest way to backup a server. With large websites containing thousands of files we know how slow things can go if the wrong method is being used.

Recently we had to backup our base chevereto install with content to a new server and it included 76k files.

Using SFTP and a client (FileZilla) as a backup method was out of the question because of the time it would take.  On an unmanaged host, you can backup the public/www folder directly from the local server to a new server using this command (this took us 10 minutes instead of 3 hours)

For this method to work, we need to have an OS installed on the destination server with SFTP/SSH access.

In the command line of the server enter this (change folder path, root username and destination IP address)

rsync -avz LOCALFOLDERPATH/ rootusername@destinationip:/DESTINATIONFOLDERPATH/

More documentation and use can be read here

Please follow and like us:

Leave a Reply