Skip to content
  • Solutions
    By Role
    • For Developers
    • For Content Managers
    • For Agencies
    • For IT Admins
    • For Web Hosters
    • For Developers
    • For Content Managers
    • For Agencies
    • For IT Admins
    • For Web Hosters
    By Infrastructure
    • Overview
    • AWS
    • Microsoft Azure
    • Alibaba Cloud
    • Google Cloud Platform
    • Vultr
    • Overview
    • AWS
    • Microsoft Azure
    • Alibaba Cloud
    • Google Cloud Platform
    • Vultr
    • Digital Ocean
    • Linode
    • Upcloud
    • Oracle
    • OVH
    • Digital Ocean
    • Linode
    • Upcloud
    • Oracle
    • OVH
  • Product
    • Plesk Features
    • Plesk Editions
    • What’s new
    • Pricing
    • Roadmap
    • Lifecycle Policy
    • Extensions Catalogue
  • Pricing
  • Extensions
    Featured Extensions
    • SocialBee
    • WP Toolkit
    • Sitejet Builder for Plesk
    • SEO Toolkit
    • Joomla! Toolkit
    • Premium Email
    • Email Security
    • SocialBee
    • WP Toolkit
    • Sitejet Builder for Plesk
    • SEO Toolkit
    • Joomla! Toolkit
    • Premium Email
    • Email Security
    Bundles and packs:
    • Business and Collaboration Edition
    • WP pack
    • Hosting pack
    • Power pack
    • Language pack
    • Business and Collaboration Edition
    • WP pack
    • Hosting pack
    • Power pack
    • Language pack

    See all Extensions

  • For Partners
    • Plesk Contributor Program
    • Plesk Partner Program
    • Affiliate program
    • Plesk University
  • Help Center
    • Documentation
    • Professional Services
    • Support
    • Contact Us
    • Wiki
    • Forum
  • Plesk 360 login
  • Free Trial
  • Solutions
    • By Role
      • For Developers
      • For Content Managers
      • For Agencies
      • For IT Admins
      • For Web Hosters
    • By Infrastructure
      • Overview
      • Plesk on Amazon Web Services (AWS & Lightsail)
      • Plesk on Amazon Web Services (AWS)
      • Plesk on Amazon Web Services (AWS)
      • Microsoft Azure
      • Alibaba Cloud
      • Google Cloud Platform
      • Vultr
      • DigitalOcean
      • Linode
      • UpCloud
      • Oracle
      • OVH
  • Products
  • Pricing
  • Extensions
    • Featured Extensions
      • SocialBee
      • WP Toolkit
      • Sitejet Builder for Plesk
      • SEO Toolkit
      • Joomla! Toolkit
      • Premium Email
      • Email Security
    • Bundles and packs:
      • Business and Collaboration Edition
      • WP pack
      • Hosting pack
      • Power pack
      • Language pack
      • See all Extensions
  • For Partners
    • Plesk Contributor Program
    • Plesk Partner Program
    • Affiliate Program
    • Plesk University
  • Help Center
    • Documentation
    • Professional Services
    • Support
    • Contact Us
    • Wiki
    • Forum
  • Plesk 360 login
  • Free Trial
  • Solutions
    • By Role
      • For Developers
      • For Content Managers
      • For Agencies
      • For IT Admins
      • For Web Hosters
    • By Infrastructure
      • Overview
      • Plesk on Amazon Web Services (AWS & Lightsail)
      • Plesk on Amazon Web Services (AWS)
      • Plesk on Amazon Web Services (AWS)
      • Microsoft Azure
      • Alibaba Cloud
      • Google Cloud Platform
      • Vultr
      • DigitalOcean
      • Linode
      • UpCloud
      • Oracle
      • OVH
  • Products
  • Pricing
  • Extensions
    • Featured Extensions
      • SocialBee
      • WP Toolkit
      • Sitejet Builder for Plesk
      • SEO Toolkit
      • Joomla! Toolkit
      • Premium Email
      • Email Security
    • Bundles and packs:
      • Business and Collaboration Edition
      • WP pack
      • Hosting pack
      • Power pack
      • Language pack
      • See all Extensions
  • For Partners
    • Plesk Contributor Program
    • Plesk Partner Program
    • Affiliate Program
    • Plesk University
  • Help Center
    • Documentation
    • Professional Services
    • Support
    • Contact Us
    • Wiki
    • Forum
  • Plesk 360 login
  • Free Trial
Plesk 360 login
Free Trial

Knowledge Base

How to restore all MySQL / MariaDB user databases from a Plesk backup

 
backupdatabasedatabaseshttpsmariadb

Question

How to restore all MySQL / MariaDB user databases from a Plesk backup?

Answer

  1. Connect to your Plesk server via SSH.

  2. Download the script to your server:

    # wget https://support.plesk.com/hc/en-us/article_attachments/29158452093463 -O restore-all-db-plesk-backup.zip

  3. Unzip it:

    # unzip restore-all-db-plesk-backup.zip

  4. Make the script executable:

    # chmod +x restore-all-db-plesk-backup.sh

  5. Find the current backup location:

    # grep "DUMP_D" /etc/psa/psa.conf | grep -v "#"
    DUMP_D /var/lib/psa/dumps

  6. List all available database backups:

    Note: If custom backup location is used, replace /var/lib/psa/dumps with the path from step 5.

    # find /var/lib/psa/dumps -name "backup_sqldump_*" -type f -printf '%fn' | sort | uniq

    File name contains the date the backup has been taken. For example, timestamp in file
    backup_sqldump_2501120422.tzst
    stands for "January 12, 2025, 04:22 AM"

    Note: The most recent backup will be at the end of the output.

  7. Open the downloaded script in a text editor. In this example, we are using vi editor:

    # vi restore-all-db-plesk-backup.sh

  8. Replace the backup name in the TIMESTAMP line:

    TIMESTAMP=backup_sqldump_timestamp.tzst

    with the backup name you wish to restore the databases. For example:

    TIMESTAMP=backup_sqldump_2501120422.tzst

  9. If custom backup location is used, change the value of DB_PATH from/var/lib/psa/dumps to the path from step 5.

  10. Save the changes and close the file.

  11. Dry run the script:

    # ./restore-all-db-plesk-backup.sh

  12. Check the list of the databases to be restored.

  13. Open the script in a text editor again:

    # vi restore-all-db-plesk-backup.sh

  14. Change the DRYRUN value from 1 to 0.

  15. Save the changes and close the file.

  16. Run the scrip:

    # ./restore-all-db-plesk-backup.sh

Tweet
Share
Share
Email
0 Shares
Read the full article
Related Posts

MariaDB vs MongoDB: Which One To Choose?

Read More »

You Are Always Safe When You Have an Up-To-Date Plesk Backup

Read More »

Plesk with Centralized Database and Network File System

Read More »
Knowledge Base

Unable to copy/back up a database in Plesk: mysqldump: Error 2013: Lost connection to MySQL server during query when dumping table

Read More »

A website is not responding when a database backup/copy operation is running in Plesk: Error establishing a database connection

Read More »

Unable to start MySQL/MariaDB on a Plesk server: Cannot open tablespace table_name which uses space ID

Read More »

Plesk or system update fails on Linux: http://yum.mariadb.org/10.1/centos7-amd64/repodata/repomd.xml: [Errno 14] HTTP Error 404 – Not Found

Read More »

Hosting Wiki

  • RESTful Web Service
  • Server Redundancy
  • Cloud Service Architecture
  • Virtualizor
  • On-Demand Services
  • Bare Metal Server
  • Backup
  • Denial of Service
  • MySQL
  • Red Hat Virtualization
  • Virtuozzo
  • Oracle VM Server
  • Citrix Hypervisor
  • Server Virtualization Software
  • Windows Server
  • Linux
  • Virtualization
  • SQL
  • VirtualMin
  • Plesk
  • SQL database
  • NoSQL Database
  • Web Server
  • DNS Server
  • SSH
  • Email Virus Protection
  • HTTP
X-twitter Linkedin Youtube Reddit Github
  • Product
  • Login
  • Pricing
  • Editions
  • For Partners
  • Partner Program
  • Contributor Program
  • Affiliate Program
  • Plesk University
  • Company
  • Blog
  • Careers
  • Events
  • About Plesk
  • Our Brand
  • Resources
  • User and Admin guides
  • Help Center
  • Migrate to Plesk
  • Contact Us
  • Hosting Wiki
  • Forum
  • Legal
  • Legal
  • Privacy Policy
  • Imprint

© 2025 WebPros International GmbH

Part of the WebPros®  Family