How to automatically create backups of all databases of customer MySQL/MariaDB server in Plesk?




  • Avatar
    Lucas van Rooij

    I don't have the option 'with arguments' available when I select command. If I select php script, the option with arguments does come available

    Comment actions Permalink
  • Avatar
    Artyom Baranov

    @Lucas van Rooij

    That is because the article is for Windows and you are using Linux.

    In that case, you may create a script like as follows (you should be logged via SSH):

    # vi /root/
    MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysqldump -u admin -A --events -r /root/backup_`date +%F.%s`.sql;

    Do not forget to make it executable:

    # chmod +x /root/

    After that, go to Plesk > Tools & Settings and create a Scheduled Task like on the screenshot:


    Comment actions Permalink

Please sign in to leave a comment.

Have more questions? Submit a request