Plesk update or upgrade failed: ERROR while trying to backup MySQL database

Follow

Comments

8 comments

  • Avatar
    Luis Zubeldia (Edited )

    this is a manual solution, but we need an automated solution.

    is not possible to change with an sript before plesk update and after plesk update to change this file?

     

    2
    Comment actions Permalink
  • Avatar
    Artyom Baranov

    @Luis Zubeldia

    Hello!

    I suggest providing your idea on User Voice: https://plesk.uservoice.com/forums/184549-feature-suggestions

    The top-ranked suggestions are likely to be included in the next versions of Plesk.

     

    1
    Comment actions Permalink
  • Avatar
    Websavers Inc

    Can't the upgrade/backup script at *least* check to see if the ownership is *already* psaadm:psaadm and not run chown on it if it is? Seems like that's at least a bare min check, no?

    We use NFS storage with a bindfs layer to force psaadm:psaadm ownership over all files within, however even in that instance, where ownership is always psaadm, we *still* get an error like: `chown: changing ownership of `/var/lib/psa/dumps/mysql.preupgrade.17.8.11-17.8.11.20190821.dump.gz': Operation not permitted`

    0
    Comment actions Permalink
  • Avatar
    Daria Gavrilova

    Hello @Websavers Inc,

    Thank you for your question.

    In case if NFS is used, then it is recommended to follow steps under the Workaround for remote NFS share used as a backup location field.
    If any issue is still encountered after that, please submit a request to Plesk Technical Support: How to submit a request to Plesk support?

    0
    Comment actions Permalink
  • Avatar
    Websavers Inc (Edited )

    Hey @Daria Gavrilova,

    Thanks for the response! I wish we could, but our understanding is that those steps in the workaround must be applied to the *NFS server* not the Plesk server running the NFS client. Is that accurate? We don't have SSH/root access to the NFS server in question, just space allotted on the server, which means we cannot make those changes.

    Also, the workaround says to use root:root as the permissions, which would solve this particular problem of Plesk updates not working, however doesn't the *rest* of the dumps folder require psaadm:psaadm ownership for Plesk backups to work successfully? In other words, doesn't this mean that we can *either* configure ownership to work well with updates OR backups but never both at the same time?

    0
    Comment actions Permalink
  • Avatar
    Maxim Krasikov (Edited )

    Hello @Websavers Inc,

    Yes are right, those steps should be applied on the remote NFS server.


    I am afraid, there is no solution which can be applied on the NFS client side.To fix the issue with updating Plesk, I suggest configuring default backup locations manually and considering using another remote backup solution:
    https://docs.plesk.com/en-US/onyx/customer-guide/78922/

    The default configuration is applied in /etc/psa/psa.conf and looks like the following:

    # Backups directory
    DUMP_D /var/lib/psa/dumps
    # Backups temporary directory. DUMP_TMP_D should not be inside of (or equal to) DUMP_D.
    DUMP_TMP_D /tmp


    As for the questions with backup permissions, when the solution is applied everything should work as expected. Without "no_root_squash" option ownerships look like the following on an NFS server:

    CONFIG_TEXT: -rw-r----- 1 nobody system_user backup_dd_conf_1901010000_1901020000.tgz

    0
    Comment actions Permalink
  • Avatar
    Websavers Inc

    Thanks @Maxim Krasikov! So the key here is that the mount *needs* to be owned by root and *not* psaadm. It's odd because default permissions for a lot of those dirs are psaadm. Perhaps there should be some consistency to it in that everything *should* be under EITHER psaadm user:group ownership or root within /var/lib/psa/dumps.

    0
    Comment actions Permalink
  • Avatar
    Maxim Krasikov

    Hello @Websavers Inc,

    If option "no_root_squash" is used, backups creation, backups restoration, and Plesk update tasks work as expected.
    I checked it using the configuration when psa/dumps/* folders are located on the NFS server:

    Plesk server:
    1. Backups are creaated in /plesk_backups/psa/dumps folder:

    # grep DUMP_D /etc/psa/psa.conf
    DUMP_D /plesk_backups/psa/dumps

    2. psa/dumps/ folder has ownership psaadm:psaadm:

    # ls -lad /plesk_backups/psa/dumps/
    drwxr-xr-x. 6 psaadm psaadm 8192 Aug 28 10:48 /plesk_backups/psa/dumps/

    3. /plesk_backups folder is the NFS share folder:

    # df -h | grep plesk_backups
    192.0.2.2:/home 37G 1.3G 36G 4% /plesk_backups

    4. Ownershipt 997:1000 is used for the directories on the remote NFS server:

    # ls -lad /home/psa
    drwxr-xr-x. 3 997 1000 19 Aug 27 23:18 /home/psa

    5. Backup are created under root:root on the NFS server:

    # ls -lad /home/psa/dumps/domains
    drwxr-xr-x. 4 root root 44 Aug 27 23:19 /home/psa/dumps/domains

    0
    Comment actions Permalink

Please sign in to leave a comment.

Have more questions? Submit a request