• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Resolved Hourly ftp backup using pleskbackup utility not working

AdelM

Basic Pleskian
Hello

I have tested hourly backup using pleskbackup utility based on this Article How to create hourly backups in Plesk

My goal is to backup hourly to an ftp server, I'm using the following command :

/usr/local/psa/bin/pleskbackup --domains-id 2 --output-file=ftp://myserver.tld/bak/folder --ftp-login=mylogin --ftp-password=mypassword

The problem is that backups are performed but never sent to ftp storage. ftp access credentials are ok and used to perform ftp backup from the backup manager.

Thanks for any help or advice.

Best regards

-------------------------------------

OS ‪ : Ubuntu 16.04.6 LTS‬
Product : Plesk Onyx Version 17.8.11 Update #45,
 
Add / to the end of URL
/usr/local/psa/bin/pleskbackup --domains-id 2 --output-file=ftp://myserver.tld/bak/folder/ --ftp-login=mylogin --ftp-password=mypassword
 
Hello Denis

Thanks for answering.

I added / at the end but still the same problem, backup files are not sent to ftp server.

Best
 
Add the option -vvvvv and look for errors in the command output
/usr/local/psa/bin/pleskbackup --domains-id 2 --output-file=ftp://myserver.tld/bak/folder/ --ftp-login=mylogin --ftp-password=mypassword -vvvvv
 
Hello Denis

Thanks remembering me the verbose option

After reading the backup Iogs, I understood what going wrong; Some characters in the password such as $ or @ are causing the issue, because all characters that follow these signs are removed
In my case, password has a @ sign and a $ signs and works without any issue when backup is executed from the backup manager.
I was aware about the @ sign as the ftp credentials short syntax uses it, but didn't expect that $ sign may cause that.

Hope this issue will be fixed in a near update.

Best regards

-----------------------------------------------------------------
Task "/usr/local/psa/bin/pleskbackup --domains-id 2 --only-mail --output-file=ftp://myserver.tld/bak/folder/ --ftp-login=mylogin --ftp-password=mypassword$chars --ftp-passive-mode -vvvvv" successfully completed in 63 seconds, output:

[18835]: 2019-03-26 09:53:11.029 DEBUG STDIN=
[18835]: 2019-03-26 09:53:11.029 INFO 6bbd7f4d-84cc-4d2b-86d0-f3bc555f1fc6 Create backup task description
[18835]: 2019-03-26 09:53:11.030 INFO 9b6d723b-336d-4076-8e1e-2228cc260013 Create task for backup
[18835]: 2019-03-26 09:53:11.033 DEBUG Task data: <?xml version="1.0" encoding="UTF-8"?>
<backup-task-description>
<misc owner-name="server" top-object-name="server" owner-may-use-server-storage="true" owner-type="server" keep-local-backup="false" verbose-level="5" top-object-type="server" owner-guid="00000000-0000-0000-0000-000000000000"/>
<dumps-storage-credentials use-passive-ftp-mode="true" storage-type="foreign-ftp">
<login>mylogin</login>
<password>mypassword</password>
<hostname>myserver.tld</hostname>
<root-dir>bak/test/</root-dir>
<file-name></file-name>
</dumps-storage-credentials>
<backup-specification>
<backup-options type="full" filter="only-mail"/>
<object-to-backup type="domain" id="2"/>
</backup-specification>
</backup-task-description>
 
You need to quote the password argument. That is shell behaviour, not pleskbackup command
/usr/local/psa/bin/pleskbackup --domains-id 2 --only-mail --output-file=ftp://myserver.tld/bak/folder/ --ftp-login=mylogin '--ftp-password=mypassword$chars' --ftp-passive-mode -vvvvv
 
Denis

Thanks, that did the trick, it's working now as expected :), backups are uploaded to ftp and deleted from the server.

Is there a way to keep only backups of the last day or 2 days ? Is there any backup rotation such as in the backup manager ?

Best regards
 
Back
Top