How to backup your linux VPS?

Kaz Wolfe

Well-known member
Registered
Joined
Jul 7, 2016
Messages
609
Points
28
I have new VPS and I have setup somethings with it but not installed a control panel. I would take a snapshot at this point for my VPS. How can i backup configurations that I did on my VPS and restore when needed?
 

24x7CSM

Well-known member
Registered
Joined
Sep 27, 2016
Messages
263
Points
28
Your provider should provide you the snapshot functionality if its a cloud based VPS. If not then you will have to take the backups manually and restore them either on your local machine or another location.
 

LJSHost

Well-known member
Hosting Provider
Registered
Joined
Jul 5, 2016
Messages
1,031
Points
63
Rsync has always been my favorite way of taking a full system snap shot from the command line.

Stop all services first.

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

You can also us it to backup the files to a remote location.
If you want to restore to that backup point simply un tar the archive and overwrite, stopping all services before you do the restore.
 
Last edited:

VirtuBox

Well-known member
Registered
Joined
May 3, 2016
Messages
1,622
Points
83
I have new VPS and I have setup somethings with it but not installed a control panel. I would take a snapshot at this point for my VPS. How can i backup configurations that I did on my VPS and restore when needed?
You can look on my backup script if you want : https://git.virtubox.net/virtubox/backup/src/master/rclone_backup.sh
it dump all database available, zip the web directory in a folder with the current data, and then use rclone to upload it to hubic.
But rclone can be used with dropbox, Amazon S3 or Google drive. I will try to add some documentation
 

LJSHost

Well-known member
Hosting Provider
Registered
Joined
Jul 5, 2016
Messages
1,031
Points
63
It is worth mentioning that you need clarify exactly what level of snap shot( backup) you require.

A bare metal restore on a VPS has to be done differently due to the partition table and boot loader and master boot record and is more complex than the examples provided above.
 

AlphaNine Vini

Member
Hosting Provider
Registered
Joined
Dec 8, 2016
Messages
59
Points
6
I am not sure what you have installed on your VPS. You could mount Google drive and rsync the files for the backup purpose.
 

racksandcloud

Well-known member
Registered
Joined
May 18, 2017
Messages
89
Points
0
Many virtualization like VMware, KVM, Xen, hyper-v provides the snapshot facility to backup the VM. but you need access to the NODE/hyper-visor or administrator access to panel to create snapshot, otherwise your hosting provider needs to allow the permission for your panel user(solusvm or onapp, etc) to take snapshot. Its better to check with your VPS provider.
Otherwise you should takes the backups manually from your vps.
 
Latest Threads
Recommended Threads

Latest Hosting OffersNew Reviews

Sponsors

Tag Cloud

You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an alternative browser.

Top