Full Server Backup and Move Using rsync

Need to make a quick backup of your server? Maybe even move all your important files? Use the following commands to backup or replicate your entire Linux server without any pain. If you are sending the backup to a remote server, use the second command. Both commands will backup non-system files (not software, only settings and user files) which is perfect if you are migrating an entire server or just need a very usable backup that keeps your directory structure completely intact all the way to the root folder. We do recommend that this command only be ran by a qualified Linux technician, there is a very real possibility that if you do not know where you are putting the files, you can overwrite files that you actually don’t want overridden so be sure to use these commands with care. Also recommended if you are replicating that you replicate to a operating system that is the same as the original machine to prevent any oddities.

When in doubt, contact Mean Servers for a quote, we can do it for you!

Local Backup: rsync -aAXv –exclude={“/dev/*”,”/proc/*”,”/sys/*”,”/tmp/*”,”/run/*”,”/mnt/*”,”/media/*”,”/lost+found”} / /path/to/backup/folder

*Be sure to replace the /path/to/backup/folder in the first one with the location of where you wish to place the backup of.

Remote Backup: rsync -aAXv –exclude={“/dev/*”,”/proc/*”,”/sys/*”,”/tmp/*”,”/run/*”,”/mnt/*”,”/media/*”,”/lost+found”} / root@<remote ip>:/path/to/remote/backup/folder

*Be sure to replace the <remove ip> with the IP address of the server you are sending the backup to and /path/to/remote/backup/folder with the full path to the remote backup folder location

This entry was posted in General. Bookmark the permalink.

Leave a Reply