After you have set up your own virtual server (VPS) or dedicated Linux server and intend to store important information on the server, you may experience or fear that your data will be lost due to technical problems.
Due to the nature of virtual servers and the importance of information security, most virtual server providers do not back up your server by default. You can also get your server from vendors who claim not to have any problems with your information because of Raid 0 or Raid10 and worst of all Raid5 on their servers. But the truth is that hard drives and Raid controllers are also likely to fail, and in this case the data will be lost. The only one who will lose in the meantime is the user because service providers all over the world do not take responsibility for your information (the nature of the services really does not allow such a guarantee for anyone). That’s why we decided to teach you how to backup Linux vps Server in this article.
How to backup linux vps
Information has a degree of importance for each person. So first you need to categorize your information and determine how important it is for you. Think about how much the organization or company has spent to produce or collect the information, then enter the importance of each piece of data in a chart so you can make the best policy about it. Information can include images, texts, project codes and files, databases, and other information.
We emphasize that if you have sensitive and very important information in your VPS, be sure to try to back up the data yourself. Although you will need another VPS or FTP backup space to make this backup and the costs will be higher, you will be comfortable with securing valuable information that may be the result of your years of activity.
Why should you make a backup?
Information on your server can be deleted for a variety of reasons. This loss of information is much easier than you think. Consider the following scenarios:
– Random execution of the rm -rf command
– Crash the server in Lock Up
– Software and hardware problems on the hard disk server
– Unauthorized entries to the server (server hacking and ransomware infection or hacker deleting information)
– Viruses that you need to reinstall the operating system to get rid of
Reasons why you think you do not need a backup
Before we begin, let us point out three important points on which you may think you do not need to back up:
1. I do not have enough time to make a backup!
The truth is that we are all busy, but thanks to different backup systems, it can be an automated and timed process that can be set up and installed in minutes. Choose how many minutes to install a backup system or the hours of stress and loss of the result of your efforts?
2. My information is protected by RAID10!
RAID is not a backup system. This is an issue that unfortunately will cause irreparable damage to users due to incorrect advertisements of some service companies. The RAID array can also be failed as a single disk. Raid is designed to increase fault tolerance, not backup, so again, RAID is not a backup.
3. I have no place to keep my data backup!
These days, you can get cheap virtual servers for backups. These services, which have a lot of disk space and are also provided by Eldernode as a virtual backup server, can be a good option for storing your backups.
I hope you are convinced that you really need to make a backup. In this post, various methods of backing up information on a virtual server using scripts or using the control panel capabilities are mentioned. We try to put different methods based on different needs in this article.
How to backup linux vps with CDP script
CDP is a script that connects to your server via SSH and backs up the folders or data you specify for it.
CDP, which stands for Continuous Data Protection, is a script written by PHP that does not require a special database. CDP uses Json to store information, which uses the least resources. (mysql as a database server will need more resources to run). Installing this script is very simple and has the following capabilities and advantages:
1. Web Management Panel
– Add server
– Add backup task
– View backups
– Download backups
– Restore backups
– Clear backups
2. Json Flat data storage (without the need for mysql)
3. Perform backups by Cron (hourly – daily – weekly – monthly and any other type you specify for the interval between backups)
4. Connection to the desired server by password or SSH key
5. Send notifications via email
6. Get an upgrade from cPanel hosting accounts
7. Ability to backup MySQL databases
8. Encrypted backup
9. Back up OpenVz Nodes
How to install CDP script on Linux
CDP script is supported on CentOS / Debian / Ubuntu Linux.
To install the cdp script, you need to connect to the vps that you provided for backup from other Linux servers and enter the following commands in order:
yum install wget nano && wget cdp.me/install.sh && chmod +x install.sh && ./install.sh
By executing the above command, simply install the cdp on your server and refer to the following address to enter the admin panel:
Enter the IP address of your backup server instead of 22.214.171.124.
The default username and password are admin, password:
You must also edit the config.php file with the following command to change other settings and specify the time as well as the email settings:
Note: We strongly recommend that you change the default password from the User section of the CDP UI.
This tutorial explains in detail the reasons for backing up a Linux virtual server. Then how to install CDP script on Linux and finally How to backup linux vps with CDP script were taught.