How to restore Plesk system databases from a Plesk daily/pre-upgrade dump

Follow

Comments

2 comments

  • Avatar
    Ehud Ziegelman

    Hi Kuzma Ivanov,

     

    What I got was:

    /var/lib/psa/dumps# zcat mysql.daily.dump.0.gz | plesk db
    ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
    exit status 1

     

    Can you please share your thoughts regarding the above?

     

    0
    Comment actions Permalink
  • Avatar
    brambamberg (Edited )

    There's an error in this guide; if you've done a complete rebuild of the database by following the steps in "How to fix InnoDB corruption cases for the MySQL databases on Plesk for Linux?", then running `plesk db` as per this guide will result in an error message because `psa` doesn't exist.

    The workaround is to do this:

    ```
    zcat mysql.daily.dump.0.gz | sed -n '/-- Table structure for table `log_actions`/,/-- Table*/p' | mysql -u admin -p`cat /etc/psa/.psa.shadow`
    ```

    0
    Comment actions Permalink

Please sign in to leave a comment.

Have more questions? Submit a request