How to Back Up Your Virtual Private Server (VPS) 2023

How to Back Up Your Virtual Private Server (VPS) 2023

Have you ever lost a large amount of data when you didn’t have it backed up and stored anywhere else? Losing data is one of the most frustrating incidences that can significantly affect your business.

Any data stored online is always susceptible to ransomware, security attack, or accidental deletion. That’s why it’s always advisable to back up your virtual private server (VPS) to quickly restore the data if any of these incidents occur.

In this article, you’ll learn a step-by-step guide on how to back up your virtual private server, whether you’re using a Linux or a Windows server.

It’s beneficial for any business owner who wants to create duplicate copies of their VPS and minimize the risk of losing their data online.

How to Back Up Data on Your VPS Server?

You can easily back up data on your VPS server to protect it from loss. To back up data on a Linux server, you can use the rsync command tool or install backup software like Timeshift, Cloudberry, or Bacula.

To back up on the windows server, you’ll need to install the Windows Server Backup feature before running the backup. You can install the windows server backup feature using the Server Manager or using PowerShell.

After installing, you can configure the server backup feature and schedule the backup according to your preferences.

Key Takeaways

Here are the key takeaways from this article about backing up your VPS server:

  1. A VPS server backup is essential for keeping your data safe and prevents you from losing data due to ransomware, hackers, or accidental deletion.
  2. Full backups are safer than incremental and differential backups, even though they take longer to run.
  3. Always keep at least two previous backup copies, whether you run daily, weekly, or monthly backup on your VPS.
  4. Diversify your backup locations for more security. Also, create a backup in case a disaster happens, and you lose the original backup.
  5. Always run a test in advance on your backup to ensure you can successfully restore your data when you need it before a disaster occurs.

Why are VPS Backups Important?

Wondering why you should back up your VPS? Here are four main reasons why a VPS backup is essential for your business:

How to Back up Your virtual private server (VPS) 2022

Facilitates file restoration

With a backup, it becomes easy to restore your files or folders when they get corrupted or accidentally deleted. Your files can get accidentally deleted as a result of an unintended human error or a system error.

Keeps data safe/ Prevent data loss

VPS backup keeps your data secure and prevents you from losing it to ransomware, hackers, and other online security threats. It helps you create duplicate copies of your site’s data so you still have it when the primary server gets attacked.

Enables quick full server recovery

In case a catastrophic loss occurs, you can use the backup to restore the whole server to its previous working restore point. This will ensure that your site does not experience prolonged downtime, which may cause financial losses to your business.

Avoid high recovery cost

Recovering from online security attacks and data losses can be ridiculously expensive. Ransomware attackers can demand heavy ransom from you if you don’t have a backup for your data. To avoid potential recovery fees, it’s always advisable to have a backup of your VPS server stored somewhere.

Available Backup Options

There are two main backup options you can use to backup your VPS server: Full backup and incremental backup:

1. Full Backup

A full backup backs up the entire data on the server and is often taken daily. It’s used to recover the whole server if a security attack occurs or information is accidentally deleted. However, you can also restore single files or folders from this type of backup.

The best thing about a full backup is that all your data is stored in one place, and restoring is not complicated. However, every backup session will require a considerable amount of time to have all the data stored.

2. Incremental backups

An incremental backup is where you continuously update changes made to files depending on how frequently you make the changes. It often involves storing a smaller amount of data compared to a full backup. Consequently, incremental backups are easier to execute and usually take less time.

One of its drawbacks is that your data has multiple restore points, and the recovery operation may be longer than expected. Incremental backups also leave no duplicate files like the ones stored when a full backup is done.

3. Differential backups

A differential backup involves backing up additions and alterations that have occurred since the last full backup.

This may sound similar to incremental backups, except that incremental backups include changes that have happened since the most recent incremental backup. Differential backups allow you to back up data faster than you would with a full backup.

Restoring data from a differential backup is faster than incremental backup but relatively slower than from a full backup. Like with full backup, differential backup stores duplicate files which can come in handy in the future.

Backup Schedule

How frequently should you back up your VPS?

The frequency of backup depends on the quantity of data you generate and how often the data changes. You can also set the schedule based on the frequency at which the data is used and how fast the backup takes place.

The three most common backup schedules include:

  • Daily backups: These are backups that take place more than once a week. They are suitable for personal VPS and accounts that are constantly updated with data.
  • Weekly backups: These are scheduled to occur every seven days, four times a month, and are also suitable for personal VPS.
  • Monthly backups: These are backups scheduled to take place only once a month.
Tip
Expert tip: Whether you go with daily, weekly, or monthly backup, configure the retention to 2 copies so you can keep two previous backups at any time within the schedule.

5 Tips For Backing Up Your VPS

Here are some tips you can follow to help you backup your VPS safely and more effectively:

1. Decide the backup locations

Before backing up your data, the first thing to do is to decide which data you want to back up and where to back it up.

Since multiple backup destinations exist for different data types, choosing your backup location upfront will make recovery easy should a catastrophic incident occur.

Some backup locations you can choose to back up your VPS include:

  • Remote cloud server
  • WebHost Manager (WHM)
  • cPanel
  • Bash scripts
  • MySQL Database backups

Off-site backup locations are the safest, even though restoring a single file or folder may take longer.

2. Choose a backup solution

Once you know the data you want to back up and your backup location–whether remote or local– decide on the backup solution. There are many options you can choose from depending on your operating system.

Any backup solution you go with will have in-built commands and tools you can use to duplicate and store your files easily. For local backups on windows and Linux, there are specific instructions on how to set up local backups and maintain them (we’ll discuss more later in the article.

Remote backups are the best for disaster recovery if your server crashes or becomes unresponsive.

3. Automate your backups

You don’t have to do the data backup manually. You can configure your backup systems such that your VPS gets automatically backed up after a specified duration. Automating will save you time and energy since you won’t need to play with command prompts to back up your data manually.

Check if your VPS provider has automated processes, which you can utilize at any time. Automating backup will also prevent you from losing critical data if you forget to back up for a considerable period.

4. Diversify your backups

Have your data backed up in different locations in case one backup location develops problems when you need it. For more security, you can also create backups for your backups in case a disaster happens, and you lose the backup too.

You can use tools like Secure File Transfer Protocol to store remote copies of your server in a different location.

When it comes to data security, the backup can never be too much–the more backups, the more secure your VPS server will be.

5. Test the server backups

After backing up your VPS, test the backups to ensure they work appropriately before the time comes when you need them.

Adequate testing will help you determine whether the backup configurations are correct and whether the system can satisfactorily restore the backed-up data. This will ensure that your VPS backup solution works as expected and won’t fail at the last minute when you need it most.

VPS Snapshots: What are They For?

VPS snapshots are instant images of your server that you can take at a specific time to act as a full restore point for your VPS. A snapshot serves as a single backup that shows the state of your server at a given time so you can restore it to that state in the event that a disaster occurs.

You can take snapshots manually on demand or configure the VPS system to take automatic snapshots on schedule.

How to Back up Your virtual private server (VPS) 2022

What are snapshots for?

  • They preserve the state of your cloud VPS to ensure accurate restoration

They provide an easy recovery option, so you don’t need to download your data to a local machine or external drive.

  • They provide a fast disaster recovery option that takes less time than the traditional server backup schedule
  • If backups get outdated or corrupted, snapshots are the second option to help restore your server to the last known best configuration.
  • In cyber security attacks, snapshots act as the last line of defense to help you recover your server and revert it to its last stable setup.

Note that a snapshot is not a backup but a temporary picture of the virtual machine (VM) and should never be used for more than 3-4 days.

Most providers use a Control Panel from which you can easily make a snapshot of your VM. For instance, if you are using Google Cloud, go to VM Instances, select the Snapshots menu and create a snapshot.

How to Back up Your virtual private server (VPS) 2022

How to Back up Your VPS on Linux Server (Step-by-step)

It’s possible to back up your virtual private server and restore it to its original state whenever you lose your data, whether on a Windows OS or Linux server.

If you’re using a Linux server, you can back up your VPS using two main methods:

  • Using the remote sync (rsync) command tool
  • Using a backup software

Let’s see how you can back up your server using each of these methods:

How to backup on Linux server using rsync

The rsync (remote sync) tool is a remote synchronization tool used to back up data locally and remotely.

It’s an incremental backup tool that transfers portions of data from the source location to the destination location when changes occur in the original data. It’s quite a straightforward method that takes a short time to run.

How do you back up your data successfully using the rsync tool? Follow the step-by-step guide below:

  1. The first step is to insert your backup destination medium and note its name or ID.
  2. Use the ’fdisk -l’ command to find the drive letter. The backup medium could be an external hard disk or a USB thumb drive.

How to Back up Your virtual private server (VPS) 2022

  1. If you are using a USB drive, you’ll need to format it first before using it to back up your data.
  2. Once you format the disk, open your terminal and run the command $ sudo rsync -aAXv / –exclude={“/dev/*”,”/proc/*”,”/sys/*”,”/tmp/*”,”/run/*”,”/mnt/*”,”/media/*”,”/lost+found”} /backup as the root user.

How to Back up Your virtual private server (VPS) 2022

  1. Once you run this command, the entire root ( / ) directory will be backed up with the exception of /dev, /proc, /sys, /tmp, /run, /mnt, /media, /lost+found directories.

If there is a large amount of data on the directories you’re backing up, the backup process may take some time.

  1. You can also back up your data using the tar command option tar cvzf /media/your_harddisk/backup.tar.gz / as a substitute to the rsync command (your_harddisk is the name or label of your hard disk).

How to Back up Your virtual private server (VPS) 2022

How to backup on Linux server using a backup software

Aside from the rsync command, you can also run your VPS backups on a Linux server using backup software.

There are several backup software you can install on your desktop computer and use to back up your Linux server. Some of the best Linux backup software include:

  • Timeshift
  • Cloudberry
  • Bacula

These software conduct automatic backups to the local storage or cloud according to the set schedule.

How to Back up Your VPS on Windows Server (Step-by-step)

Like with Linux, you can also backup your VPS on a windows server if you are using the Windows OS. But first, you need to install the windows server backup feature if you don’t already have it on your machine.

The windows server back-up is a Microsoft in-built feature that provides backup and restoration options for a windows server. It allows you to back up the entire server, selected files and folders, specified volumes, and the system state.

You can install the windows server backup feature in two ways: Using the Server Manager or using the PowerShell.

Installing Windows Server Backup using the PowerShell

PowerShell is the easiest option for installing a windows server manager.

  1. Open the Windows PowerShell application and type the command PS C:> Get-WindowsFeature-Windows-Server-Backup.
  2. Run the command and check the installation state as displayed on the window.

How to Back up Your virtual private server (VPS) 2022

If the install state says ‘available,’ the windows server backup feature is available for installation.

  1. Run the command PS C:> Install-WindowsFeature -Name Windows-Server-Backup to start installing the backup feature.
  1. When the installation is done, re-run the first command (PS C:> Get-WindowsFeature Windows-Server-Backup) to verify whether the feature has been successfully installed.

How to Back up Your virtual private server (VPS) 2022

As you can see, the install state will now say ‘installed’ instead of ‘available.

Installing using the Server Manager

The server manager is another option you can use to install your windows server backup feature.

To install using the server manager, use the following procedure:

  1. Go to the server manager dashboard and click Add roles and features

How to Back up Your virtual private server (VPS) 2022

  1. Select installation type as Role-based or features-based installation, then click next.

How to Back up Your virtual private server (VPS) 2022

  1. Go to the server selection and click next. Navigate to features and check the Windows Server Backup box, then click next.

How to Back up Your virtual private server (VPS) 2022

  1. Go to ‘Confirmation’ to confirm the installation selections before pressing Install.

How to Back up Your virtual private server (VPS) 2022

Installation of the windows server backup feature will start and when it’s over, click close to dismiss the installation window.

How to Back up Your virtual private server (VPS) 2022

Configuring the Windows Server Backup Feature

After installing, you need to configure the windows server backup feature to back up your VPS files.

Configuring the server includes setting up daily or weekly backups so that your data will be automatically updated and your VPS remains secured. Daily backups are the most recommended since it’s possible to lose a significantly large amount of data within seven days of weekly backups.

Follow the steps below to configure your windows server backup effectively:

  1. Open the app from the start menu and click the Run dialogue
  2. Input wbadmin.msc in the dialogue box and click OK. A pop-up window will appear.
  3. On the right panel wizard, choose Backup Once, then choose your backup options before clicking next.

How to Back up Your virtual private server (VPS) 2022

How to Back up Your virtual private server (VPS) 2022

  1. Move down to Select Backup Configurations and choose a full server, which is the most recommended option. With a full server backup, you can back up all your server data, applications, and system state.

How to Back up Your virtual private server (VPS) 2022

If you choose custom, the next step would be to select the items you want to back up.

How to Back up Your virtual private server (VPS) 2022

Press Add items to select the folders you want to back up. The selected folders will appear in the windows.

How to Back up Your virtual private server (VPS) 2022

  1. Click Next to specify the backup time — how often you want the backups to run and at what time of the day. You can set the backup once a day or more than once a day, depending on how much data you generate.

How to Back up Your virtual private server (VPS) 2022

  1. Click Next to proceed to Specify Destination Type for your server backup. Here you’ll select where you want your VPS backup data to be stored, whether on a dedicated hard disk, on local drives, or in a remote shared folder.

If you choose the remote shared folder option, you’ll need to enter the address of the shared folder. If you go with the local drives, you’ll need to specify the drive volume in the next step.

How to Back up Your virtual private server (VPS) 2022

The safest and most recommended option is to back up to a hard disk that’s only dedicated for backups. When you click next, another window will appear for you to select the destination disk.

If you only have one disk or all disks in the server have an OS installed, the following error will be shown when you select the hard disk option.

How to Back up Your virtual private server (VPS) 2022

A similar error will be shown if there is no valid volume as a backup destination.

How to Back up Your virtual private server (VPS) 2022

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

How to Back up Your virtual private server (VPS) 2022

Click Yes to the warning that appears to proceed.

  1. On the left panel wizard, move down to Confirmation to confirm the backup configuration settings before clicking Finish.

How to Back up Your virtual private server (VPS) 2022

The backup schedule will be created, and an information window will appear as below:

How to Back up Your virtual private server (VPS) 2022

The scheduled backup will be shown in the Windows server backup application. You can also perform a manual backup at any moment using the configured options or configuring new ones as per the outlined procedure.

Conclusion

Backing up your VPS server is the surest way to keep your business from losing critical data. Losing large quantities of data can not only retard growth but also cause financial losses to your business.

If you’re a business owner who uses a Virtual Private Server to store data, you don’t need to worry about losing data to hackers, ransomware, and other Cybersecurity attacks. All you need to do is set up and schedule frequent data backups for your VPS server.

Note that the more frequent the backups, the more secure your data will be.

Setting up and running backups is easy whether you’re using a windows or Linux user.

Now that you know how to back up your virtual private server (VPS) go ahead and find a VPS backup solution provider from these Top 10 VPS hosting providers and start keeping your critical data safe and secure.


Next Steps: What Now?

Here are some practical steps you can take from this step-by-step guide on how to back up your VPS server.

Further Reading

Here are some valuable resources you can use to learn more about how to back up data on your VPS server:

  1. How to back up data on dedicated servers and VPS
  2. VPS backups are simple—you’re just overthinking it
  3. 5 tips for backing up your VPS
  4. How to choose an effective backup strategy
  5. Preferred backup configurations for dedicated and VPS systems
  6. How to create and download a backup on a VPS
  7. How to create snapshots of your cloud VPS
  8. What can you use a VPS snapshot for?
  9. How to connect to a VPS: a step-by-step guide

FAQ’s

Question: How do I back up my entire server?
Answer: To perform a full server backup, install the windows server backup feature, then open the server manager>Tools>Windows Server Backup. Provide the backup operator credentials and go to Local backup>Action>Backup once. Choose Specify the backup destination and frequency, then confirm details before running the backup.
Question: How do I restore a VPS backup?
Answer: Open the server on which the VPS is present, then open the backup directory. Select the VPS backup date. You’ll get a list of several VPS backups from which you can select the backup you’d like to restore. Click Restore for all the backed-up data to be restored.
Question: What is the safest way to backup data?
Answer: The safest way to backup data is to have two local copies on different devices (e.g., on an external drive and a USB) and one off-site backup (e.g., on a cloud backup service)
Question: What’s the difference between a snapshot and a backup?
Answer: A snapshot is a point-in-time copy of a server that enables you to restore it to its last stable state should a data loss occur. Backups are duplicate copies of the entire server that you can restore when you lose the original data. While Snapshots are stored on the original network, backups are often isolated from the mainframe.

How To Set up a VSFTPD Server on a CentOS 7 VPS or Dedicated Server

Brief Description FTP is usually insecure exposing clear-text passwords, userna
2 min read
Avi Ilinsky
Avi Ilinsky
Hosting Expert

How To Set up a VSFTPD Server on an Ubuntu 16.04 VPS or Dedicated Server

Brief Description FTP data is usually insecure since information (usernames, pa
2 min read
Eliran Ouzan
Eliran Ouzan
Web Designer & Hosting Expert

How to use phpMyAdmin to develop a website (without MySQL experience)

Brief description A web developer who is not well versed into coding websites f
2 min read
Idan Cohen
Idan Cohen
Marketing Expert

How to Install MySQL on a Windows Web Server Running Apache

This tutorial will show you how to install the MySQL database on a Windows serve
3 min read
Michael Levanduski
Michael Levanduski
Expert Hosting Writer & Tester
HostAdvice.com provides professional web hosting reviews fully independent of any other entity. Our reviews are unbiased, honest, and apply the same evaluation standards to all those reviewed. While monetary compensation is received from a few of the companies listed on this site, compensation of services and products have no influence on the direction or conclusions of our reviews. Nor does the compensation influence our rankings for certain host companies. This compensation covers account purchasing costs, testing costs and royalties paid to reviewers.
Click to go to the top of the page
Go To Top