How Can We Help?
< All Topics
Print

Securing Your Data: A Guide to Backing Up and Restoring a VPS Server

Backups are crucial in data management because they protect against human errors, hardware failures, virus attacks, power failures, and natural disasters, saving time and money.

a) Linux

Backup the VPS Linux server using rsync

1. First, insert the backup target medium and note its name or ID.

2. Then, use the “\’fdisk -l\’ ” command to locate the drive letter of the backup medium, which can be either an external hard drive or a USB thumb drive.

VPS server

3. If you are using a USB drive, you need to format it before using it to back up your data.

4. Next, open a terminal and run the command sudo rsync -aAXv / –exclude={“/dev/*”,”/proc/*”,”/sys/*”,”/tmp/*”,”/run/*”,”/mnt/*”,”/media/*”,”/lost+found”} /backup as the root user.

5. Finally, the entire root (/) directory except the /dev, /proc, /sys, /tmp, /run, /mnt, /media, and /lost+found directories will be backed up.

6. The backup process may be time-consuming if there is a significant amount of data in the directory to be backed up.

7. You can also use the tar command option tar cvzf /media/your_harddisk/backup.tar.gz/ instead of the rsync command to back up data (your_harddisk is the name or label of the hard disk).

Use backup software to backup the Linux server

Backup software like Timeshift, Cloudberry, and Bacula can be installed on desktop computers to run VPS backups on Linux servers. These programs automatically back up to local storage or the cloud according to a set schedule.

b) Windows

Install Windows Server Backup using PowerShell

1. First, log into your Windows VPS and search for the Windows Power Shell application in the Windows search bar.

2. Then, open it and type the PS C:\> Get-WindowsFeature-Windows-Server-Backup command in it.

3. Next, the command should be executed, and the installation status displayed in the window should be checked.

4. Afterwards, if the Windows Server Backup feature is available for installation, use the PS C:\>Install-WindowsFeature -Name Windows-Server-Backup command to start installing the backup feature.

5. Finally, rerun the first command (PS C:\> Get-WindowsFeature Windows-Server-Backup) to verify that the feature was successfully installed.

Install Windows Server Backup using Server Manager

1. First, log into your Windows VPS and search for Server Manager in the Windows search bar to select Add Roles and Features.

2. Then, select the installation type as role-based or feature-based installation and click the Next button.

3. Next, go to Server Selection and click the Next button.

4. Then, navigate to Features and check the Windows Server Backup box, then click Next.

5. After that, navigate to the “Confirmation” tab to confirm the installation selection and click the “Install” button.

6. Finally, click the “Close” button to close it after completing the installation.

Configure the Windows Server backup feature

1. After installing Windows Backup Feature, open it from the Start menu and click the Run dialog button.

2. Then, enter wbadmin.msc in the dialog box and click the “OK” button.

3. Next, select Backup Once in the right panel wizard, select the backup option and click Next.

4. After that, select Full Server in the Backup Configuration section to back up all server data, applications, and system states.

5. If you selected Custom, the next step is to select the items you want to back up.

6. Then, click the “Add Item” button to select the folders you want to backup, and they will be displayed in the window.

7. Next, click Next and specify the frequency and time of day to schedule backups. You can set up backups once or multiple times a day, depending on the amount of data generated.

8. After that, click “Next” to specify the server backup target type, including where VPS backup data will be stored, such as a dedicated hard drive, local drive, or remote shared folder.

9. If you select the remote shared folder option, you need to enter the address of the shared folder. If you are using a local drive, you will need to specify the drive volume in the next step.

10. The most recommended backup option is to back up to a dedicated hard drive, and selecting the target disk after clicking Next is crucial.

11. The hard disk option will be selected if only one or all disks on the server have the operating system installed.

12. Then, if there is no valid volume as a backup target, a similar error will be displayed.

13. If you have a valid storage disk, all data on the selected disk will be deleted before moving the data to the dedicated disk to ensure backup integrity.

14. After that, click on the “Yes” button on the warning that appears to continue.

15. Next, navigate to Confirmation in the left panel wizard to confirm the backup configuration settings, and click Finish.

16. Finally, the backup plan will be created and an information window will appear.

Table of Contents