50% 할인 모든 플랜, 기간 한정. 시작 가격 $2.48/mo
15분 남음
서버 및 OS

VPS에서 데이터를 백업하고 복원하는 방법

Matt Schmitt By Matt Schmitt 15분 분량 Updated Apr 15, 2023
VPS 데이터 백업 및 복구

Backing up your server data or your VPS hosting is not as hard as you may think. And it is a necessary thing to do. This article will get explain how you can back up and restore data on VPS hosting, or a VPS server to local backup storage.

목차

What Is a Backup Server?

If you have a website or a web server that you use to run programs on, or a remote computer that you use as a remote desktop to do some critical work, there is always a risk of losing your data. You may lose the website content that you have worked so hard to produce or gather, you may lose the settings and configurations that you had done so meticulously, or you may lose actual data stored on the server. For whatever reason that it can happen, whether a cyber attack or hack, losing access, corruption in your website or data, wiping your storage by mistake, or any other way, it is a nightmare. However, you can prevent that nightmare from coming true.

That is what backup severs are for; if you backup your critical data to a backup server, a backup VPS, a cloud backup, or local backup storage regularly, you can save yourself from all that headache. This is a task that can be automated or scheduled.

What is storage VPS?

back up and restore data on vps

A VPS or Virtual Private Server is a minimal emulation of a server in the way that an actual server is broken down into dedicated portions which act and run as independent virtual machines.

There are many VPS hosting solutions out there, but you can also use a VPS as remote backup storage for your critical files and data on your main server or VPS hosting. This is called a Storage VPS.

First Step: Find Out Your Current Backup Plan

Try to find out an answer to these questions:

  • Is your VPS or Dedicated server backed up?
  • Does the backup include only a portion of your files, or are all the files included?
  • Is the backup local (i.e. on the same machine) or do you have a secure remote backup elsewhere?

There are various choices and configurations included in making a proper and secure backup, but a managed VPS or hosting can relieve you from some of the hassles.

We will go through some factors that can help decide what to do.

windows-vps Windows 10 VPS 호스팅

원격 데스크톱용 Windows 10 VPS를 최저가로 이용하세요. NVMe SSD 스토리지와 고속 인터넷 위에서 구동되는 Windows 10을 무료로 제공합니다.

Windows 10 VPS 플랜 보기

Backup Use-Cases

The two main reasons that you may need your backup data are:

  1. File Restoration: You need to restore a file or folder that has been corrupted or deleted due to an attack, an error, or an honest mistake.
  2. Full Server/Data Recovery: You need to restore your whole server or data to a previous working restore point before the disaster.

Types of Backup

Whether you have a VPS or another hosting system like a dedicated server, there are two common types of backups: full and incremental.

1- Full backups

Full backups are typically taken daily and backup the entire data on the server. Although you can restore single files or folders, they are mainly intended for full server recovery or restore operations.

Advantage: All of the data on the server is backed up and is stored in one place.

Drawback: It takes a while every time to back up all the data.

2- Incremental Backup

Incremental backups update changes to the files and system into the backup. Since the size of each operation is smaller, you can schedule it to execute more regularly.

Advantage: These types of backups take less time and are easier because there’s less information to back up every time.

Drawback: There are multiple restore points; therefore, when you need a larger recovery or restoration operation, the information you need may be spread across several restore points.

How can I back up and restore data on VPS?

First, you need to make sure you have enough space for your backup and for the backing up operation. For example, if you want to backup VPS to local storage, you need to make sure that you will be left enough space for your machine to continue working smoothly. If you want to compress the backup so that it takes less space, you will need enough space for the uncompressed copy as well as the compressed backup. If you want to store the compressed version remotely, you should remember that every time you take a backup, the older compressed version won’t be deleted until the new version is completely relocated.

When configuring and choosing the type of backup you want to make, your entire server is backed up by default, but if you choose the incremental method, every time it will only back up the files and folders that have changed since last time. Therefore, for restoring your entire data or server you may need to go through several restore points in the backup.

windows-vps Windows 10 VPS 호스팅

원격 데스크톱용 Windows 10 VPS를 최저가로 이용하세요. NVMe SSD 스토리지와 고속 인터넷 위에서 구동되는 Windows 10을 무료로 제공합니다.

Windows 10 VPS 플랜 보기

How to Configure Local Backups on a cPanel Dedicated Server or VPS

Here we will show a step-by-step guide for how to back up a dedicated server or back up VPS to a local backup file, in WHM.

Step 1 : Login as the root user

Log into WHM as the root user. You should be able to do this by entering https://your.server.hostname/whm in your browser.

Step 2 : Click on  the hamburger icon

Now that you are logged into the WHM, if you can not see the sidebar, click on this 🍔 and you should be able to see it now (the hamburger icon is made of three short horizontal lines).

Step 3 : Select Backup Configuration

Type in “Backup” in the search box. Then click on the Backup Configuration in the sidebar menu option.
enable backups in backup vps

Step 4 : Enable Backups checkbox

The Backup Configuration options will appear in the main part of the WHM window. Then checkmark the Enable Backups checkbox if it is not checked. This way, when you have stored these configurations, the next time the backup process is run, the data will be backed up in the way you have specified.

Step 5 : Choose back

Next, You can choose whether your backup would be compressed, uncompressed, or incremental.

choose if you want your backup to be compressed

    1. Compressed backup: your files and folders will be compressed into a file named gzip-compressed .tar file. It’s slower but takes up less space.
    2. Uncompressed backup: your files and folders are simply copied as they are. It’s faster but takes up more space.
    3. Incremental: every time only the changes are backed up.

함께 읽기: VPS의 올바른 IP 주소를 확인하는 방법

Step 6 : Access cPanel to check the available disk space

Next, you can choose if you need cPanel to check the available disk space before attempting to back up. This will make sure that your backup system does not accidentally take all the available disk space.

Step 7 : Set the timeout limit

The next stage is where you can set the timeout limit for successfully backing up the data. It is entered in seconds.

Step 8 : set a restoration timeout limit

The next stage is for the event when you actually are trying to restore files from backup to your main system. You can set a restoration timeout limit in seconds before cPanel gives up on restoring a single file and continues to the next file.

Step 9 : Backup Schedule.

Now, this is important. Here you can select days of the week when the daily backup process will be run.
select how many backups

Step 10 : Select backups number

Finally, you can select how many backups on each backup-day should the cPanel make and their Retention. Retention means how many backups will be kept for safekeeping. If you choose, for example, 5 daily backups with a retention of 2, cPanel will keep the two most recent successful backups for each day, and delete the older ones to free up space.

Step 11 : Chpoose weekly backups

The weekly Backup schedule is just like the previous stage, but, Well, weekly.

Step 12 : Select both options

Next will be your monthly back options, which are two: on the first day of every new month, or on the 15th, and of course, you can select both.

Step 13 : Select back ups files

Which files to back up? Now once again, an important stage.
The first choice you can make is to back up the User Accounts. You can choose to do so, or select specific user accounts to be included in the backup. There are a few more options under that, including:
1- Back up suspended accounts;
2- Back up Access Logs.

Step 14 : Back up Bandwidth data

1- Use Local DNS (you can leave it unchecked)
2- And then, check the Backup System Files section.

Step 15 : 데이터베이스

The next part is the Databases, here you can choose how cPanel will try to back up your Databases, in three ways:
1- Per Account Only
2- Entire MySQL Directory
3- For every account and entire MySQL folders and directories (the best option)

At the very last steps of these configurations, you are able to adjust the location of the backups. By default, this is /backup – and if you have a second hard drive for backups with its mount point there, then you won’t need to change anything and the system will back up to the secondary hard drive.

windows-vps Windows 10 VPS 호스팅

원격 데스크톱용 Windows 10 VPS를 최저가로 이용하세요. NVMe SSD 스토리지와 고속 인터넷 위에서 구동되는 Windows 10을 무료로 제공합니다.

Windows 10 VPS 플랜 보기

How do I restart the Windows backup service?

If you have a Windows Backup Service process stuck and you need to restart it, first stop the current backup job. You need to sign in as an admin user and run the command prompt (admin). In the prompt console, stop the current backup job using this command:

wbadmin stop job

another way for stopping the Windows Backup Service is through the desktop. For that method, follow these steps:

Step 1 : Open Server manager

Click Start in the lower-left corner of the computer. Type Server Manager in the search box and then open it.

Step 2 : Click Mange

Click on the Manage button.

Step 3 : Remove roles.

Click Remove Roles and Features.

Step 4 : Click Next

Click Next to select a server you want to remove roles and features from.

Step 5 : Uncheck Backup option box

Uncheck the Windows Server Backup option box. Then press Next.

Step 6 : Click Remove

Click Remove to turn off Windows Server Backup service.

For starting the Windows Backup Service again, you can follow these same steps and add the feature again.

For starting the Windows Backup Service through cmd (command prompt), do the following:

Step 1. Sign in as Administrator

Step 2. Run Command Prompt (admin)

Step 3. Run this command:

wbadmin enable backup

Visit Microsoft’s wbadmin enable backup documentation page to see how to define backup parameters through that command.

How to configure and Back up VPS to Google Drive

back up vps to google drive

Google is by no exaggeration one of the best things that the human being has created. Not only you can use it to store your daily and routine data like sheets, docs, pdf and… You can also back up vps on google drive, how cool is that? So follow the below steps to do so:

Step 1 : Login as a root user

Log in to WHM as a root user.

Step 2 : Additional Destinations section

Go to > Backup > Backup Configuration, then scroll down to the Additional Destinations section.

Step 3 : Select Google Drive.

 에서 Destination Type dropdown menu, select Google Drive.

Step 4 : Create a new destination

4) Then, click on Create a new destination.

Step 5 : Enter a name

Enter your desired destination name.

Step 6 : Select backups location

Enter the desired folder where you wish to store backups.

Step 7 : Client ID

Enter your client ID and client secret.

Step 8 : Generate Credentials

Click Generate Credentials to generate the credentials file. A new tab will appear for you to authorize access to your Google Drive data.

Step 9 : Timeout duration

 Enter your desired Timeout duration.

Step 10 : Save changes

Click the button Save Destination.

함께 읽기: 5 Ways to secure Windows VPS

What is the best way to backup files on VPS?

There are best practices as to how to backup files on your VPS. I will go through them very shortly:

1. Decide What Needs to Be Backed Up and Where

This may seem simple, but where do you keep your backups matters in several ways. The space it takes, the time it takes for a successful backup, and how easy it is to find your backup and restore your files.

For instance, if you are doing full server backups only, having at least one full copy stored locally or a server image on your, can save time when you need to restore a single file.

2. Decide on Your Backup Solutions

Your backups can be stored locally, remotely, or a combination of the two.

Depending on your operating system, there are built-in tools and commands to copy and store files locally. As long as your server is not rendered unreachable, you can restore those files easily.

Both Linux and Windows have options for setting up and maintaining local backups.

Remote backups are an invaluable tool for disaster recovery. In the unfortunate event that your server becomes unresponsive crashes, remote backups allow you to restore from a recent restore point and minimize data loss.

3. Automate Backups Wherever Possible

Most hosting control panels, such as Interworx, Plesk, and cPanel, have an automatic backup system that allows for easy setup and management of backups for your VPS. If there is an automated process for your backups, use it!

4. Diversify Your Backup Locations

If you choose to have VPS backups stored locally and remotely by your host provider, using tools like Secure File Transfer Protocol (SFTP) to keep remote copies at another location gives you a lot more security. There is no such thing as too much safety.

5. Test Server Backups Before You Need Them

Without regular testing, you could still be at risk if the backup is not configured the right way or is not working properly. Testing makes sure that the methods you have chosen work best for your project and environment.

windows-vps Windows 10 VPS 호스팅

원격 데스크톱용 Windows 10 VPS를 최저가로 이용하세요. NVMe SSD 스토리지와 고속 인터넷 위에서 구동되는 Windows 10을 무료로 제공합니다.

Windows 10 VPS 플랜 보기

결론

If you are an owner of an online business and your entire business depends on your website and its health, then it would be wise to have a backing up plan for your data every now and then.

I know all of the backup processes might seem like a headache and all, but imagine the situation that you have come across a real deal problem in your website and the only thing that can save the day for you is a backup file.

So, leave all the bad emotions about the backup process behind and follow the steps mentioned in this article to back up and restore data on VPS. And be sure that doing it has fewer headaches than not doing it.

공유

블로그 더 보기

계속 읽기.

Cosmos Cloud로 실행할 수 있는 최고의 셀프 호스팅 앱 - Cosmos 대시보드와 앱 패널 커버 이미지.
서버 및 OS

Cosmos Cloud로 실행할 수 있는 셀프 호스팅 앱 모음: 파일, 미디어, 비밀번호, 자동화 등!

Maybe Cosmos Cloud를 이미 설정했고 어떤 앱이 잘 맞는지 알고 싶거나, 아직 Cosmos를 도입할지 결정하지 못해 실제 워크플로에 얼마나 잘 맞는지 확인하고 싶다면

Nick SilverNick Silver 16분 분량
Portainer vs Cosmos Cloud로 Docker 앱 관리하기 — 하이브리드 설정 다이어그램과 운영/접근 블록이 담긴 커버 이미지.
서버 및 OS

Portainer vs Cosmos Cloud: Docker 앱 관리에 적합한 선택은?

Docker를 이미 알고 있고 늘어나는 앱 스택을 더 깔끔하게 운영할 방법을 찾고 있다면, 답은 간단합니다. Portainer vs Cosmos Cloud 중 직접적인 제어 측면에서는 Portainer가 더 나은 선택입니다.

Nick SilverNick Silver 14분 분량
Cosmos Cloud vs CasaOS vs Umbrel — 셀프 호스팅의 세 가지 경로를 추상적인 클라우드 네트워크 배경으로 표현한 피처 이미지.
서버 및 OS

Cosmos Cloud vs CasaOS vs Umbrel: 내 환경에 맞는 셀프 호스팅 플랫폼은?

간단히 말하면, CasaOS는 여전히 시작하기 가장 쉬운 선택이고, Umbrel은 큐레이션된 경험이 가장 깔끔하며, 도메인과 설정을 더 세밀하게 제어하고 싶을 때는 Cosmos Cloud가 더 적합합니다.

Nick SilverNick Silver 11분 분량

배포할 준비가 됐나요? 월 $2.48부터.

2008년부터 운영해온 독립 클라우드. AMD EPYC, NVMe, 40 Gbps. 14일 환불 보장.