Among the most important things that should be paid special attention to in the virtual server is taking a backup in the virtual server; Important information that any organization, company or even private sector has in its virtual server may be suddenly lost or deleted during processes, at this time, by preparing a backup copy of the virtual server, you will be able to restore the desired files. Re-upload to the server.
If you are one of the people who keeps files or important things on the server, taking a backup on the virtual server should be one of your first priorities, with the loss of your site data, your site may be unavailable forever; So backup is considered important and necessary…
In this article, we have tried to tell you the simplest backup methods of Windows and Linux virtual servers so that you can have a backup copy of your virtual server at any time.
In the following, you can go with Ded9 to check the following:
- Backup from Windows virtual server
- Backup from Linux virtual server
- Reasons for backing up from a virtual server
- Common mistakes in VPS backup
Reasons for backing up from a virtual server
The existence of unforeseen cases such as:
- Hackers and malware
- Human errors and server error
Various factors cause the loss of the server’s database, which can have many risks for the website and even cause us to lose essential files; Among the main cases, the intervention of hackers and malware or human errors and even server errors can be mentioned.
In simpler terms, suppose your server has an antivirus and a firewall, and you think that you are safe in every way, this negligence creates many openings for hackers to gain access to your site through various methods. At this time, if you do not have a backup copy of your server, you may easily lose your files.
Or the existence of human errors and errors on the server such as: failed updates or accidental deletion of some files that cause you to lose the original files and essential items, so always having a backup or a backup copy of the files on the server. You will be able to access the desired information and files at any time.
Backup from Windows virtual server
In order to make a backup copy of Windows Server, it is necessary to install the Windows Server Backup service; So follow the steps below to access the desired service; If you have just purchased a Windows virtual server, you don’t need to back up, because you don’t have any data to back up!
First, run Server Manager as shown in the following image:
Next, choose option number two: Add roles and features:
Now continue the relevant steps to the Features section and click on the Next option; After reaching the relevant section, find the term Windows Server Backup and select the corresponding tick; Then click on the Next option:
After confirming the process and starting the installation, click on the Install option:
When the installation is complete, click Close and restart the server:
Start backup on Windows Server
Run the Windows Server Backup service and then click on the Local Backup option, then click on the Backup Schedule option:
In the first section, click on the Next option:
Now specify the type of backup; If you want to back up all Windows data, choose the first option, and if you want to back up only one directory, choose the second option, and then click on the Next option:
In the next section, set the backup time and then click Next to continue:
In this section, you will have three options;
1. If you have two hard drives and you want the system backup to be stored on your second hard drive, choose the first option.
2. If you want to save the backup on the server’s main hard drive, choose the second option.
3. In this section, if you have web or network storage space, it is recommended to use this option.
Choose one of the available options according to your choice and then click on the Next option:
Select the desired path to save the backup and then click on the Next option:
Finally, click on the Finish option to save the applied settings:
Your automatic backups have now been successfully saved and will be backed up at the times you have recorded; Click on the Close option to close the desired window:
Backup from Linux virtual server
If you have purchased a Linux virtual server from us, you can ask the support team to do the backup for you; Otherwise, run the desired server and then use the following command, note that after running the command, the backup of the Linux server will be done automatically:
tar -cvpzf yourbackupfilename.tar.gz --exclude=/path/to/backup/yourbackupfilename.tar.gz --one-file-system /
Note: In the desired command, you can change the name of the backed up file instead of the section: yourbackupfilename;
The output of the desired command will be in accordance with the image you see
Using WinSCP software
What is WinSCP used for?
According to WinSCP.net: SCP Software is a free open-source SFTP client, FTP client, WebDAV client, S3 client, and SCP client for Windows; Its main function is to transfer files between a local computer and a remote computer. Beyond this, WinSCP provides scripting and native Linux file management;
In a simpler and more diverse introduction; WinSCP is a software that is also used to transfer data or download required files from a Linux VPS to a computer or main system.
To check and use WinSCP software, you can go to the desired link under the title: Download WinSCP software; Have the necessary access
Download the backup file from the Linux server
Run the software and then enter the desired Linux server;
Right click on the desired zip file from the backup file and select the Download option:
Common mistakes in VPS backup
Common mistakes in backup make the backup process on the server completely pointless, if you do not pay enough attention to the things mentioned, you may lose the server backup file; So don’t forget to observe the following points during the backup process:
Updated backup versions
If you also have an activity on your server that creates new files every few days, then you need to perform the backup process every three days; Observing regular backup will allow you to have any file from the server you want.
Naming server backup versions
You may need to access the backup of the desired file during the backups you prepare during the work; In the meantime, if the file you are looking for does not have a specific name, it may be confused with the rest of the backup copies, so prioritize the naming of each backed up file.
Backup storage on the main server
Definitely and strictly avoid saving the server backup file in the main location of the desired server and store the files in another part other than the main location of the server, suppose if your server goes down or there is a problem with the server. You can’t access the backup file of the server.