Looking for a free hosting panel often ends in VestaCP. It comes with a simple control panel and user friendly features.

It allows to set up backup to local or FTP server. However, VestaCP FTP backup often fails due to wrong configuration.

That’s why, we often get requests from customers to fix VestaCP FTP backup as part of our Server Management Services.

Today, we’ll see how our Backup Experts setup VestaCP backup via FTP and fix common errors with it.

The need for FTP backup

Backup of accounts and configuration files are critical for any server. Moreover, the backup location becomes critical when the server backup hard disk crashes. That’s where a remote FTP backup location helps.

Here, the server takes a backup and then copy it to a remote server using the popular File Transfer Protocol. Luckily, VestCP incorporates secure FTP mechanisms like SFTP too. Thus, it provides additional security in the backup data transfer too.

VestaCP owners get a complete hosting panel free of cost. And, VestaCP allows customization of the existing control panel too. Similarly, some of the configuration in VestaCP panel, like backup setup, may involve system administration commands too. That’s where the role of an expert comes in.

How we setup VestaCP FTP backup

Let’s now take a look on how our VestaVP experts setup backup via FTP on the server.

We login to the VestaCP panel as admin user and access the Server >> Configure option.

Then, we fill in the following details.

  1. Protocol : FTP or SFTP based on the protocol that will be used in the backup transfer. When using FTP, it uses port 21, while for SFTP, it will be 22.
  2. Host : This field will contain the FTP server that saves the backup.
  3. Username : The ftp user that can connect to the backup ftp server.
  4. Password : The password of the FTP user
  5. Directory : The directory that holds the backup files and folders. If there are multiple servers backing up to same FTP server, it will be ideal to define folders for each server.

And, the final backup configuration will appear as :

Saving this backup configuration will complete the FTP backup setup in VestaCP.

 

Common VestaCP FTP backup errors and fixes

Although, the FTP backup setup is pretty much self explanatory, customers get error while taking backups. Let’s take a look on the related errors and how our Support Engineers solve it.

 

1. Incorrect VestaCP remote backup settings

Recently, one of our customers reported errors with his backup. He was getting the following error when trying to set SFTP for remote backup.

VestaCP remote backup Error code: 1

In this case, we checked the backup configuration at /usr/local/vesta/conf/sftp.backup.conf and found that the port setting was incorrect. Therefore, after verifying the connection to remote FTP server via SFTP, we edited and corrected the settings.
And, the VestaCP FTP backup started working fine.

 

2. Missing binary path

Similarly, often missing binary path can also be a reason for FTP backup errors. The customer was getting the following error when trying to execute the backup script v-add-backup-host from command line.

#: v-add-backup-host
bash: v-add-backup-host: command not found

This was a problem with the environment variable and not related to script as such. Therefore, our Dedicated Engineers solved it by setting the path of VESTA correctly using:

export VESTA=/usr/local/vesta/

After declaring the correct path, the backup script started working again.

 

3. Remote FTP Backup 0mb file size

Backup having 0 byte is another common error faced in VestaCP FTP backup. Here, the local backups work correctly. And, the error happens only when making backups to the external FTP server. The file size shows up as filesize 0 byte.

On checking the backup logs, we found the following entries.

-- SUMMARY --
2019-03-05 12:25:48 Local: /backup/srv45/site1.2019-03-05.tar
2019-03-05 12:25:49 Remote: ftp://xx.121.yy.xxxMHBackup/site1.2019-03-05.tar
2019-03-05 12:26:51 Size: 324 Mb
2019-03-05 12:27:01 Runtime: 1 minute

To fix the problem we had to configure the server firewall to accept the range of passive ports that the ftp server was using. And, backup started working fine.

[Finding problems with VestaCP FTP backup? We can fix it for you.]

 

Conclusion

VestaCP FTP backup allow server owners to maintain a backup set at a remote FTP server. However, the setup can fail due to bad backup settings, broken binaries and so on. Today, we saw how our Support Engineers setup FTP backup in VestaCP and fix errors with it.



Source link

Author

Write A Comment