Plesk Backup fails Error: Unable to rotate dump: The dump rotation is failed with code '126'

Created:

2016-11-16 13:10:37 UTC

Modified:

2017-08-16 17:22:14 UTC

1

Was this article helpful?


Have more questions?

Submit a request

Plesk Backup fails Error: Unable to rotate dump: The dump rotation is failed with code '126'

Applicable to:

  • Plesk 12.5 for Linux
  • Plesk 11.x for Linux
  • Plesk 12.0 for Linux

Symptoms

Scheduled backups to FTP Repository saved in Server Repository and does not appear in FTP Repository tab of Backup Manager for domain.

Plesk Backup Manager shows the following error:

Error: Unable to rotate dump: The dump rotation is failed with code '126' at /usr/local/psa/admin/bin/plesk_agent_manager line 1041.

Error: Can't upload file 'resellers/`<reseller_name>`/backup_`<reseller_name>`_info_YYmmddHHMM.xml' to ftp. Error code: 1

In session log /usr/local/psa/PMM/sessions/YYYY-mm-dd-HHMMSS.nnn/psadump.log following error can be found:

YYYY-mm-dd HH:MM:SS ERROR .... Can't upload file 'resellers/`<reseller_name>`/backup_`<reseller_name>`_info_YYmmddHHMM.xml' to ftp. Error code: 1
....
....
....
Use of uninitialized value in numeric eq (==) at /usr/local/psa/admin/bin/plesk_agent_manager line 827

When trying to upload manually a file comparable in size with backup file to FTP repository it may either fail or succeed.

Cause

Connectivity issues between Plesk and remote FTP server. Dump rotation error code 126 indicates transport network issues.

Resolution

  1. Try to upload a file created on Plesk server to FTP server with pmm-ras utility.

    Create a test file:

    # dd if=/dev/zero of=/root/testfile bs=1M count=1900
    # ls -lh
    -rw-r--r-- 1 root root 1.9G Mar 4 04:59 testfile

    Export system variable with <ftp_user> password:

    # export DUMP_STORAGE_PASSWD=*******

    Upload test file:

    # /usr/local/psa/admin/bin/pmm-ras --upload-file --file-from=/root/testfile --file-to=ftp://<ftp_user>@ftp.<example.com>/users/<ftp_user>/00-vps/testfile --use-ftp-passive-mode --verbose --debug
    ....
    [2015-03-04 05:01:41.970|21110] INFO: Curl output :
    ....
    [2015-03-04 05:01:41.970|21110] INFO: > STOR testfile
    [2015-03-04 05:01:41.970|21110] INFO: < 451 Quota limit exceeded.
    [2015-03-04 05:01:41.970|21110] INFO: * Failed FTP upload: 451
    ....
    [2015-03-04 05:01:41.985|21110] INFO: pmm-ras finished. Exit code: 1

    Clear system variable with password:

    # unset DUMP_STORAGE_PASSWD

    This message from FTP server 451 Quota limit exceeded. means that quota limit is exceeded. That is why in this case backup files can not be uploaded.Increase quota limit for user on the FTP server.

  2. Check permission of the <ftp_user> to delete and/or rename files on the FTP server.

    # ftp ftp.example.com
    Connected to ftp.example.com (1.1.1.1).
    220 Another visitor. Stay a while...
    Name (ftp.example.com:root): <ftp_user>
    331 FTP login okay, send password.
    Password:
    230 User logged in, proceed.
    Remote system type is UNIX.
    Using binary mode to transfer files.

    ftp> cd /users/<ftp_user>/00-vps
    250 Directory changed to /users/<ftp_user>/00-vps

    ftp> ls
    227 Entering Passive Mode (nn,nnn,n,nn,nnn,nnn).
    150 Opening ASCII mode data connection.
    drwx------ 54 ftp ftp 54 Feb 10 22:02 ..
    ....
    ....
    ....
    -rw-r--r-- 1 ftp ftp 524288000 Mar 2 21:33 testfile_old
    226 Transfer complete. Closing data connection.

    ftp> delete ./testfile_old
    550 Permission denied.

    There is message from FTP server, 550 Permission denied. . That is why in this case backup rotation fails.Provide permission to delete files for user on the FTP server.

Have more questions? Submit a request
Please sign in to leave a comment.