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
  • Pricing
  • 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)
      • 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
  • Pricing
  • 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)
      • 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

Backup and Restore Extension Data

 
extensions guideplesk features available for extensionsbackupdatabaseserver

There are three distinctive ways to work with data in the extension to
ensure it is backed up and restored when necessary:

  • Storing the data in the Plesk Key-Value Storage,
  • Storing the data in SQLite databases,
  • Using Backup SDK hooks.

Plesk Key-Value Storage

This is the recommended way, it covers most cases. The idea here is to
store and work with the extension data using the following methods:

  • pm_Client::setSetting()
    and
    pm_Client::getSetting()
    for customer and reseller data,
  • pm_Domain::setSetting()
    and
    pm_Domain::getSetting()
    for subscription or domain data, and
  • pm_Settings:set()
    and
    pm_Settings::get()
    for any kind of data

This way, all the data is stored in the Plesk Key-Value Storage, which
is automatically backed up with the rest of Plesk data. Also, all the
extension data in the Key-Value Storage can be safely and correctly
restored. To sum up, using this approach eliminates the need to take any
additional steps to facilitate the extension data backup and restore.

SQLite Databases

All the data saved by the extension in its local database will be stored
on the file system in the Plesk /var/ directory (use the
pm_Context::getVarDir()
method to obtain the exact location). This directory is automatically
backed up by Plesk whenever a server backup is performed. The extension
data will be restored along with the rest of Plesk data during a full
server restore.

Note: The extension data will not be backed up in case it is only a
subscription or a customer or reseller account that is being backed
up.

Note: The extension data will not be restored in the case of a partial
(select accounts or subscriptions) restore from a full server backup.

To ensure the integrity of your extension data, please keep in mind the
following important information.

Warning: In the course of restoring backed up Plesk data, some of the restored
Plesk object IDs may be changed. If your extension stores such Plesk
object IDs in the database, they may become outdated and incorrect
after the restore.

Using
GUIDs

or names to reference the Plesk objects, when necessary, will help
protect the integrity of your extension data through the backup and
restore processes.

Backup SDK Hooks

In rare cases, when the specifics of certain extension data make it
impossible to use the Key-Value Storage, the mechanism of backup SDK
hooks can be used instead.

Classes
pm_Hook_Backup_Client,
pm_Hook_Backup_Domain
and
pm_Hook_Backup_Server
provide methods backup() and restore(). Depending on the nature
of data, one or several of these classes should be used to create
extension classes that inherit and override methods backup() and
restore() with relevant instructions on how the corresponding data
is to be backed up and restored.

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

Exploring Plesk’s Added Value Solutions So Far in 2023

Read More »

Unveiling Sitejet Builder: The Perfect Match for Your Effortless Website Creation Needs

Read More »

Dynamic List vs. Active List: A Comprehensive Comparison – Unveiling the Ultimate Winner!

Read More »
Knowledge Base

Removing Backup Files from Server

Read More »

Database Server – Using MariaDB or Percona as the Default Database Server

Read More »

Downloading Backup Files from Server

Read More »

Uploading Backup Files to Server

Read More »

Hosting Wiki

  • Server Redundancy
  • Bare Metal Server
  • Backup
  • Oracle VM Server
  • Server Virtualization Software
  • Windows Server
  • Plesk
  • SQL database
  • NoSQL Database
  • Web Server
  • DNS Server
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