Article ID: 5884, created on Dec 22, 2008, last review on Aug 11, 2016

  • Applies to:
  • Plesk 11.0 for Linux
  • Plesk Sitebuilder 4.5 for Linux/Unix
  • Plesk Sitebuilder for Windows


How to back up Sitebuilder data?


Sitebuilder data can be backed up with the Backup feature in the Sitebuilder GUI, using the sbbackup utility and dumping Sitebuilder data manually.

NOTE: The below methods allow to back up user and site configuration data on the Sitebuilder server. The site's data on the published server is not dumped.

  1. Backup feature in Sitebuilder GUI.

    Log in to Sitebuilder as the administrator and go to Server > Backup.

    Click Create Backup Now to start dumping.

    After the dumping process is finished, you will see the dump you created:

    File: /usr/local/sitebuilder/backups/backup_all_20081222_0905.compressed

    NOTE: Dumping of Sitebuilder modules is a PHP memory-consuming process. Therefore, the following error might can be received, if there are many sites that use modules.

    PHP Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 2540273 bytes) in /usr/local/sitebuilder/include/SB/Site.php on line 818

    In this case, a full backup of Sitebuilder is not created. As a solution, you may temporarily increase the memory_limit parameter in Sitebuilder php.ini configuration file:

    ~# grep memory_limit /opt/php52/etc/php.ini
    memory_limit = 1024M      ; Maximum amount of memory a script may consume (16MB)

    Restart Apache and create the backup through the GUI. Then change the parameter back, and restart Apache.

    IMPORTANT: Permanently increasing the memory_limit parameter in Sitebuilder PHP is not recommended, as server performance can be affected.

    After creating the backup, change the memory_limit parameter back to the recommended value of 64M.

    Alternatively, you may back up all Sitebuilder objects (users, sites) one-by-one with the sbbackup utility.

  2. Sitebuilder backup with the sbbackup utility. To back up all content:

    # /usr/local/sitebuilder/utils/sbbackup all --compress --output=/BACKUP/DIR/ALL_BACKUP.gz

    (/BACKUP/DIR is the directory where backup files are saved to. Select a valid location of your choice.)

    Again, note that dumping of Sitebuilder modules is a PHP memory-consuming process. If there are many sites that use modules, you might get an empty resulting file, ALL_BACKUP.gz.

    Use the command below to dump the user and all its sites.

    # /usr/local/sitebuilder/utils/sbbackup user --uuid=<user uuid> --with-sites --with-site-content --recursive --compress --output=/BACKUP/DIR/USER.NAME_BACKUP.gz

    If the user is a Reseller, then all Site Owners that belong to the user are dumped with this command.

    The following MySQL query can be used to get a list of UUIDs for regular Sitebuilder users:

    mysql> select uuid from user where user_name not like 'admin%';
  3. Manual dumping of Sitebuilder data.

    To back up Sitebuilder data, you may simply save the /usr/local/sitebuilder/htdocs/sites directory, the /usr/local/sitebuilder/config file, and the sitebuilder3 database. You may use the following commands to back up the site directory and configuration:

    # tar -zcf sitebuilder.dump.`date +%F.%s`.tgz /usr/local/sitebuilder/htdocs/sites /usr/local/sitebuilder/config
    ~# mysqldump -u<user> -p<password> sitebuilder3 > /BACKUP/DIR/sitebuilder3.dump.`date +%F.%s`.sql

    (<user>/<password> are the username and password for the MySQL administrator.)

    The exact name of the Sitebuilder database can be found using the sb_config utility:

    # sb_config --help | grep sb_db_name
      --sb_db_name         Sitebuilder database name [sitebuilder3]

    For details about the utilities sbbackup/sbrestore for Sitebuilder 4.5, refer to the Backing Up and Restoring Plesk Sitebuilder Data chapter of the Administrator's Guide.

  4. Scheduled backup of Sitebuilder.

    To create a scheduled backup task, create a script that dumps all content of Sitebuilder, and put the script into crontab.

    Below are examples of such a script.

    This first script is for dumping all content. As a result, one backup file is created in the /BACKUP/DIR directory.
    sbbackup all --compress --output=/BACKUP/DIR/ALL_BACKUP.gz

    The following script is to dump all Sitebuilder users with their sites. As a result, a backup file for each Sitebuilder user is created in the /BACKUP/DIR directory.
    mysql_bin="/usr/bin/mysql"  # mysql binary
    mysql_user="admin"  # user of mysql administrator
    passwd="setup"  # password for mysql administrator  
    mysqlsb="$mysql_bin $mysql_opt -u$mysql_user -p$passwd sitebuilder3"
    query="select uuid from user where user_name not like 'admin%'" 
    for user in `echo "$query" | $mysqlsb`
    $sbbackup user --recursive --compress --with-sites --with-site-content --uuid=$user --output=/BACKUP    /DIR/$user.dump.`date +%F.%s`.gz

Search Words

problem with sitebuilder site

restore sitebuilder

How to back up Sitebuilder data

Restore sitebuilder

fad6dc0c8e983c17ae70a51ac7952cd0 56797cefb1efc9130f7c48a7d1db0f0c f7f840260c1591440648a375a64b5b75 d055be4fdc562a8ecb8e6d0bf419f946 ea6a61e571a858aa6019ceb068ea403a a914db3fdc7a53ddcfd1b2db8f5a1b9c 29d1e90fd304f01e6420fbe60f66f838 2a62cbceb986d1b8f45bcd3ff4cb29a5 aea4cd7bfd353ad7a1341a257ad4724a 0a53c5a9ca65a74d37ef5c5eaeb55d7f

Email subscription for changes to this article
Save as PDF