opened image

Backups are not performed on the server with VestaCP

Description of the backup situation.

​When performing a backup on a server with the VestaCP control panel, backups of sites and databases are created. In the process of creating backups, site files and data, as well as databases, are first copied and stored on disk. However, a successful final backup requires additional free disk space.

When creating a backup in VestaCP, approximately twice as much free disk space is required, since during the process of creating a backup, site and database data is copied and saved. A copy of the data takes up additional disk space, in addition to the space already used by the database and site files.

Due to lack of free disk space, MySQL stops working. The reason is that MySQL uses a certain amount of disk space for its work, including storing database data and temporary files. If there is not enough free disk space, MySQL may shut down because it cannot continue processing queries and writing data.

Thus, if there is not enough free space on the disk to store backups, this can lead to difficulties with MySQL and even stop it. Therefore, it is important to ensure that you have enough free disk space to perform a backup on VestaCP in order to avoid such situations and ensure the normal operation of the MySQL database.

Recommendations

When the VestaCP backup fails or the MySQL service stops, here are some recommendations to check:

  1. Low disk space:
  •                  Check if there is enough free disk space to create a backup:
    • df -h

If there is no free space, you need to clean up old logs, journals, unnecessary backups or temporary files. Logs cannot be deleted, only cleared.

  •          Try clearing the backup queue with the command:
    • v-update-sys-queue backup

 

  •    Stopping a backup. If the backup does not stop, run the command to force the compression process to end:
    • killall -9 gzip
  • If you need to stop all cron jobs, run the command:  
    • service cron stop
  • Make sure the permissions on the /home/backup directory are set correctly. Run the command:
    • chmod -R 775 /home/backup

                 

  •  Restarting the VestaCP panel. To restart the VestaCP panel, run the command:
  • service vesta restart
  • Make sure the MySQL root /root/.my.cnf password matches the password specified in the /usr/local/vesta/conf/mysql.conf file.
  • Check VestaCP configuration files or CMS config files for errors.

 2. Backup error log. 

     Check the log file /var/log/vesta/backup.log for more information on errors. Be guided by the error codes for performing backups, which may indicate the reason for the unsuccessful operation. Pay attention to the error codes and their comments to determine the possible causes of this situation.

Next, you can already navigate by the error code:
 

0OKCommand completed successfully
1E_ARGSNot enough arguments
2E_INVALIDObject or argument is invalid
VALUENAMECOMMENT
3E_NOTEXISTObject does not exist
4E_EXISTSObject already exists
5E_SUSPENDEDObject is suspended
6E_UNSUSPENDEDObject is already suspended
7E_INUSEThe object cannot be deleted because it is being used by another object.
8E_LIMITObject cannot be created due to hosting package restrictions
9E_PASSWORDWrong password
10E_FORBIDENThe user cannot access the object.
11E_DISABLEDSubsystem disabled
12E_PARSINGConfiguration not working
13E_DISKNot enough disk space to complete the action
14E_LAServer busy to complete action
15E_CONNECTConnection failed. Host not available
16E_FTPFTP server not responding
17E_DBDatabase server not responding
18E_RRDRRDtool failed to update database
19E_UPDATEUpdate operation failed.
20E_RESTARTService restart failed

 

These guidelines will help you solve some common errors when backing up the VestaCP server control panel.