Parallels Plesk Panel - 9.5 Reference Guide

Parallels® Plesk Panel
Preface 3
About This Guide ........................................................................................................................... 3
Typographical Conventions ........................................................................................................... 3
Feedback ....................................................................................................................................... 4
Plesk Backup and Restore Overview 5
Backup Objects: Hierarchy and Volume ....................................................................................... 7
Backup Logical Structure ............................................................................................................ 10
Specifying Location of Temporary Directory ............................................................................... 14
Performing Backup 15
Defining Data for Backup ............................................................................................................ 17
Examples ........................................................................................................................... 21
Defining Properties of Files That Compose Backup ................................................................... 24
Setting Up Backup Export ........................................................................................................... 26
Defining How the Backup Process is Performed ........................................................................ 28
Checking Free Disk Space Before Starting the Backup Process ............................................... 29
Performing Restore 30
Defining Objects for Restore ....................................................................................................... 31
Defining How the Restore Process is Performed ........................................................................ 34
Conflict Resolution Rules and Policies ........................................................................................ 35
Reference 38
pleskbackup Commands and Options Reference ....................................................................... 38
pleskrestore Commands and Options ......................................................................................... 42
Custom Conflict Resolutions ....................................................................................................... 44
Conflict Description Messages .......................................................................................... 44
Resolutions Description Format ........................................................................................ 45
Samples of Policy Description........................................................................................... 54
Samples of Conflict Resolution With Rules ....................................................................... 55
Preface 3
In this section:
About This Guide ............................................................................................... 3
Typographical Conventions ............................................................................... 3
Feedback .......................................................................................................... 4
Formatting convention
Type of Information
Example
Special Bold
Items you must select, such as menu options, command buttons, or items in a list.
Go to the System tab. Titles of chapters,
sections, and subsections.
Read the Basic Administration chapter.
Italics
Used to emphasize the importance of a point, to introduce a term or to designate a command line placeholder, which is to be replaced with a real name or value.
The system supports the so called wildcard character search.
Monospace
The names of commands, files, and directories.
The license file is located in the
http://docs/common/licen
ses directory.
Preface
About This Guide
This guide is intended for administrators of servers with Parallels Plesk Panel who wish to perform Plesk backup and restore operations via command line interface (using the pleskbackup and pleskrestore utilities).
Typographical Conventions
Before you start using this guide, it is important to understand the documentation conventions used in it.
The following kinds of formatting in the text identify special information.
4 Preface
Formatting convention
Type of Information
Example
Preformatted
On-screen computer output in your command­line sessions; source code in XML, C++, or other programming languages.
# ls –al /files
total 14470
Preformatted Bold
What you type, contrasted with on-screen computer output.
# cd /root/rpms/php
CAPITALS
Names of keys on the keyboard.
SHIFT, CTRL, ALT
KEY+KEY
Key combinations for which the user must press and hold down one key and then press another.
CTRL+P, ALT+F4
Feedback
If you have found an error in this guide, or if you have suggestions or ideas on how to improve this guide, please send your feedback using the online form at
http://www.parallels.com/en/support/usersdoc/. Please include in your report the guides title,
chapter and section titles, and the fragment of text in which you have found an error.
Backup and restoration are among the most critical processes of hosting environment
C H A P T E R 1
Plesk Backup and Restore Overview
management. Parallels Plesk Panel provides graphical user interface (GUI) and command line interface (CLI) solutions to perform backup and restore tasks.
The main features of the command-line backup/restore solution are the following (marked with asterisk (*) present in GUI, too):
Flexible backup and restore
Supported are not only full backups and restores, but also partial which allow to choose the level of Plesk objects that should be backed up or restored (resellers, clients, domains), and, moreover, to select almost any specific set of the objects.
Even more flexible backup: only configuration*
Every backup object is understood as composed of configuration and content: configuration is a set of all object properties and settings, and content is the objects binary data. It is possible to created light-weight backups which include only configuration of the selected objects.
Mail-oriented backups
One may create a backup which contains only content and configuration of mail system owned by the selected objects.
Web site oriented backups
One may create a backup which contains only content and configuration of Web sites on domains owned by the selected objects.
Various options of storing backups
Plesk provides a dedicated storage - Backup Repository*, in addition to this, a backup can be exported as a single file directly to a specified FTP server or any location on file system.
Calculating domain backups in disk usage statistics*
Plesk disk space usage statistics can be set up so that the domain backup size is count in overall domain disk usage and in overall disk usage of the domain owner, irrelevant to where the backup is stored.
Prudent restore*
Restore adds the data from backup to that existing in destination Plesk, not replaces it.
Advanced restore conflicts resolution
Plesk restore, when encounters conflicts between backup data and data in Plesk that cannot be automatically resolved, returns highly-detailed description of such conflicts. Which allows admin to accurately perform restoration with applying comprehensive set of conflict resolutions
6 Plesk Backup and Restore Overview
In this chapter:
Backup Objects: Hierarchy and Volume ............................................................ 7
Backup Logical Structure................................................................................... 10
Specifying Location of Temporary Directory ...................................................... 14
Plesk Backup and Restore Overview 7
Backup Objects: Hierarchy and Volume
Plesk provides opportunities for backing up and restoring nearly all hosting data, which includes its major objects: Administrator account, reseller accounts, client accounts, domain accounts, mail accounts, databases, Web sites, and subdomains. These backup objects are organized into a strict hierarchy where parent object is always an owner of its children. The hierarchy is as follows:
Figure 1: Backup objects hierarchy
As you can see on the diagram, Plesk backup objects are levelled into 4 levels: server, resellers, clients and domains levels. The levels are such that a higher level includes
objects on the lower levels but a lower level is completely separated from the higher objects.
8 Plesk Backup and Restore Overview
You can create either full or partial backup. Full backup is the highest-level backup, it
Backup Object Type
Own Configuration
Own Content
server
Settings of server-level services (mail and database servers, SSO, application vault, spam filters and antivirus), server preferences, Sitebuilder configuration, Plesk account templates, license keys, certificates, interface preferences, Plesk billing settings.
License keys, custom button icons, Plesk skins, Plesk locales, Web application packages.
admin
Personal Plesk Administrator information.
reseller
Personal reseller information, limits and permissions on resources, IP pool and Web application pool configuration, personal domain and client templates settings, custom buttons settings.
Virtual host templates, custom button icons.
client
Personal client information, limits and permissions on resources, IP pool and site application pool configuration, personal domain and client templates settings, custom buttons settings.
Virtual host templates, custom button icons.
includes all Plesk data: server, admin and all descendant backup objects. Partial backup includes only backup objects you need, of any of the levels. For information on available options when creating partial backup, refer to the Defining Data for Backup section (on page 17).
Note: Full backups do not include Plesk modules data.
Restoring a backup, in turn, can also be either full or partial. Full restore revives all data contained in a backup, and partial revives a part. For information on available options when restoring data from backup, refer to the Defining Objects for Restore section (on page 31).
As mentioned, each backup object has own data. These data consist of backup object configuration and content:
Configuration defines properties of the backup object and its descendants. Content contains binary data related only to the backup object (database backups,
mail attachments, etc).
This means that, for instance, client configuration includes configuration of the domain he/she owns, but their content is completely independent.
This table shows what data (configuration and content) is related to each backup object.
Plesk Backup and Restore Overview 9
Backup Object Type
Own Configuration
Own Content
domain
Resource usage limits, permissions, domain­level service settings (IP address, mail system, mailing lists, DNS, tomcat applications, traffic statistics), custom button and domain alias settings, domain administrator personal information, SSL certificates, hosting type settings.
Mailing lists, tomcat applications, custom button icons.
mailuser
Personal mail user information, permissions, mailbox settings, mail aliases, forwarding settings, mailgroup settings (only for mailgroup accounts), autoresponders configuration, addressbook (horde turba), SpamAssassin/drweb settings, custom buttons settings.
Mail box content, autoresponder attachments, SpamAssassin files, custom button icons.
database
Database server settings and database user settings.
Database dump.
phosting
System user account settings, scripting settings, Web applications settings, Frontpage user credentials, log rotation settings, anonymous FTP settings, list of web-protected site locations, list of domain web users, subdomain settings, web statistics settings, hotlinking protection settings, performance and shared SSL settings.
Virtual host content, content of installed Web applications, virtual directories content, web user home directories content.
subdomain
System user account information, scripting options, Web applications list, hotlink protection settings, protected directory settings, and shared SSL settings.
Content of virtual sub­host, content of installed Web applications, custom button icons.
10 Plesk Backup and Restore Overview
Backup Logical Structure
<info>.xml
Metadata files of full and server-level backups, one per backup, describe configuration and content of server, admin, and all their descendants.
<content>.<zip|tar|tgz>
Archives with content of server and admin.
clients/
Directory containing the following backup data:
clients owned by admin or having
no owner
objects owned by the clients Organization of the directory is the
same as that of
<repository>/resellers/<resel
ler ID>/clients/.
domains/
Directory containing the following backup data:
domains owned by admin or having
no owner
objects owned by the domains Organization of the directory is the
same as that of
<repository>/resellers/<resel ler ID>/clients/<client
ID>/domains.
resellers/
Directory containing the following backup data:
resellers objects owned by the resellers
By default, all Plesk backups are created in Plesk backup repository located on Plesk server:
in Plesk for Linux/Unix, repository location is specified by the DUMP_D variable
defined in the /etc/psa/psa.conf configuration file
in Plesk for Windows, repository is located in the %plesk_dir%\Backup\ folder,
where %plesk_dir% is environment variable specifying directory where Plesk is installed (if installed to default locations, it is C:\Program Files\Parallels\Plesk\”)
The repository is structured as follows, starting with the content of repository root folder (we omit auxiliary files and folders which are irrelevant for backing up/restoring Plesk data using pleskbackup/pleskrestore utilities):
Plesk Backup and Restore Overview 11
<reseller ID>/
Directories containing backup data of particular resellers, one reseller per directory, and the objects owned by them.
The reseller ID stands for the reseller login name.
<info>.xml
Metadata files of the reseller backups, one file per backup, describe configuration and content of the reseller and the objects she owns.
<content>.<zip|tar|tgz>
Archives with the reseller content.
domains/
Directory containing the following backup data:
domains owned by the reseller objects owned by the domains
Organization of the directory is the same as that of
<repository>/resellers/<resel ler ID>/clients/<client
ID>/domains/.
clients/
Directory containing the following backup data:
clients owned by the reseller objects owned by the clients
<client ID>/
Directories containing backup data of particular clients, one client per directory, and the objects owned by them.
The client ID stands for the client login name.
<info>.xml
Metadata files of the client backups, one file per backup, describe configuration and content of the client and the objects he owns.
<content>.<zip|tar|t
gz>
Archives with the client content.
domains/
Directory containing the following backup data:
domains owned by the client objects owned by the domains
<internationa l domain name> <domain
ID>/
Directories containing backup data of particular domains, one domain per directory, and the objects owned by them.
The domain ID is omitted if the domain IDN is less than 47 symbols.
12 Plesk Backup and Restore Overview
<info>.xml
Metadata files of the domain backups, one file per backup, describe configuration and content of the domain and the objects it owns.
<content>
Other files and folders which contain domain contents, and its children contents and configurations.
Plesk Backup and Restore Overview 13
Files of each backup are placed in the repository folders according to the described structure.
If a partial backup is created, its files will be places according to the place the backup objects have in the hierarchy. For example, if backing up domain example.com owned by reseller JaneDoe, its files will be located in the <repository root directory>/resellers/JaneDoe/domains/example.com/ folder. If backing up reseller JohnDoe who owns a domain joe.info and has one client DukeNukem who owns domain sample.org, the backup files will be located in the following folders:
1. <repository root directory>/resellers/JohnDoe/
2. <repository root
directory>/resellers/JohnDoe/domains/joe.info/
3. <repository root
directory>/resellers/JohnDoe/clients/DukeNukem/
4. <repository root
directory>/resellers/JohnDoe/clients/DukeNukem/domains/sample
.org/
To distinguish files belonging to different backups of the same object, specific prefix and suffix are added to the file names:
prefix backup is added by default, and, if you like, you can change it to your own
on a per-backup basis (details (on page 24))
suffix designating the backup creation date is always added to each backup file, the
date format is <yymmddhhmm>. For example, files of backup created on March 8, 2009, 1:30 am will have suffix 0903080130.
Plesk is capable of exporting backup as a single file (.tgz in Linux/Unix and .zip in Windows). Each archive has the same structure as the repository, the only difference is that there is only one <info>.xml file on each level.
In case a partial backup is exported, the resulting file structure is reduced from the top so that the highest level corresponds to the level of the highest backup object. For example, if a single client (called, say, SandyLee) backup is exported, the resulting file will have the following structure:
zip {
<sandy lee info>.xml n*<content>.zip domains/
domain1/
 ...  domainN/  ...
}
14 Plesk Backup and Restore Overview
Specifying Location of Temporary Directory
By default, the following directories on the server are used for storing temporary files during Plesk hosting data backup and restoration:
/tmp on Linux and FreeBSD systems.  <operating_system_installation_directory>\PrivateTemp on
Windows systems.
If you have large amounts of data to back up and restore and are not sure that there is enough free disk space in the default temporary directory location, then you can specify another location for storing temporary files.
This is done by setting environment variables in the operating system of the server.
To set a new location of the temporary directory on Linux or FreeBSD
servers:
1. Connect to the server over SSH.
2. Open for editing the file /etc/psa/psa.conf.
3. Locate the variable DUMP_TMP_D and replace the /tmp value with a
path to the new location of the temporary directory.
The new directory must be present in the file system and writing to this directory must be allowed for all users.
4. Save the file.
To set a new location of the temporary directory on Windows servers:
1. Connect to the server as administrator.
2. Click Start, and then click Run.
3. In the Run dialog box, type regedit, and then click OK. This will start
Registry Editor.
4. Locate the HKEY_LOCAL_MACHINE\SOFTWARE\PLESK\PSA Config\Config\ and specify the new location of temporary directory
in the DumpTempDir variable.
The default value of the DumpTempDir variable is %plesk_dir%\PrivateTemp\.
5. Quit Registry Editor.
To perform backup of Plesk hosting data, you need to execute the pleskbackup utility
C H A P T E R 2
Performing Backup
command composed so that it does the following:
1. defines Plesk data which is going to be backed up
2. defines the way of how the backup process will be performed
3. defines properties of the files that will be contained in backup
4. defines options for exporting backup as a single file
Note: Only first component is obligatory, others are optional.
The following sub-sections explain each component meaning and implementation in detail.
The pleskbackup utility location is:
in Plesk for Linux/Unix: /usr/local/psa/bin/pleskbackup in Plesk for Windows: %plesk_dir%\bin\pleskbackup
where %plesk_dir% is environment variable for Plesk installation directory. By default, it is C:\Program Files\Parallels\Plesk
To see a complete list of the pleskbackup commands and options, refer to the pleskbackup Reference (on page 38).
If the command execution succeeds, backup is created in the default server backups location or exported to a file in case exporting options were specified. (For details, refer to the Setting Up Backup Export section (on page 26).) If the command execution fails, backup is not created.
In case domain backup files are set to be included in the statistics on disk space usage (in Plesk GUI: Server Settings > System Preferences) and backups are stored in Plesk backup repository, Plesk works as follows:
Disk space occupied by a domain backup files is count in the overall domain disk
space usage.
Overall resellers/clients disk space usage includes disk space occupied by
backups of all domains that the reseller/client possesses, stored in the Plesk backup repository.
16 Performing Backup
In this chapter:
Defining Data for Backup................................................................................... 17
Defining Properties of Files That Compose Backup........................................... 24
Setting Up Backup Export ................................................................................. 26
Defining How the Backup Process is Performed ............................................... 28
Checking Free Disk Space Before Starting the Backup Process ....................... 29
Performing Backup 17
Defining Data for Backup
Defining data that should be backed up includes the following:
1. Defining backup level and, unless it is server level, optionally, selecting which resellers|clients|domains should be backed up.
2. (optional) Defining which resellers|clients|domains should be excluded from the backup.
3. (optional) Restricting backup to either only mail or only physical hosting, and only to configuration.
4. (optional) Defining that log files are excluded from backup.
Generally speaking, the data that can be backed up with one call of the pleskbackup utility is represented by any single cell of the following table.
18 Performing Backup
Performing Backup 19
Example 1: With one call of pleskbackup, you can backup hosting data for several resellers (row 5 or 6 in the table, depending on whats more convenient: to list resellers that should be included or those excluded) and restricting the backup data to configuration of physical hosting on domains owned by the resellers or their clients (column 4 in the table).
Example 2: With one call of pleskbackup, you can backup mail configuration and content (column 5) for all domains existing on the server (row 12).
The rest of this section explains each option in detail. Possible command syntax and examples of commands are in the Examples sub-section (on page 21).
Defining backup level and selecting objects
To define backup level and select backup objects, the commands of pleskbackup utility are used.
If performing a selective backup, resellers, clients or domains selected for the backup should be specified by their identifiers which are either logins/names or IDs. The specification can be done in one of the following two ways:
Command line specification. The backup command takes objects identifiers as
arguments separated with spaces.
File specification. The backup command takes thefrom-file option which
specifies the file where the identifiers of objects are listed. The file must be in plain text format, and object identifiers are separated by line breaks (i.e., one identifier per line).
Note: If a command contains both specifications, file specification is used and the command line specification is ignored.
Command syntax and samples (on page 21).
Defining which objects should be excluded
Objects that should be excluded from backup are specified by their logins (reseller, client accounts) or names (domain accounts). The specification can be done as follows:
Command line specification. The backup command takes objects identifiers as
values of theexclude-<reseller|client|domain> option separated by commas.
File specification. The backup command takes the objects identifiers from the file
specified by theexclude-<reseller|client|domain>-file option. The file must be in plain text format, and object identifiers are separated by line breaks (i.e., one identifier per line).
Note: It is acceptable to use both specifications in one command. In such case, all specified objects are excluded from backup.
Command syntax and samples (on page 22).
20 Performing Backup
Restricting backup to only mail or only physical hosting, and to only configuration
The amount of backup data can be further narrowed to backing up either mail or physical hosting content and configuration by using theonly-mail oronly- hosting options, respectively.
Specifying theonly-hosting option results in backing up only Web-site-specific data which includes the following, for each domain with physical hosting:
Web site content (including protected directories, Web users, MIME types) Web hosting configuration (including settings of anonymous FTP, log rotation,
hotlink protection, shared SSL, web users)
installed site applications databases subdomains
Specifying theonly-mail option results in backing up only mail-specific data which includes the following:
if used for the partial backup, for each domain included in backup:
configuration of domain-level mail system (including domain keys) mail accounts mailing lists
if used for the full backup, in addition to previous:
SPF spam protection configuration RBL protection settings ACL white and black list configurations
The amount of backup data can also be narrowed in another way: by specifying that only configurations of the selected objects should be backed up. The specification is done by using theonly-configuration option.
Such backups are useful when the objects content is backed up by a third-party system.
Command syntax and samples (on page 23).
Excluding log files from back up
In case Plesk log files related to the hosted objects are not required to be backed up, they can be excluded from the backup by using theskip-logs option.
Command syntax and samples (on page 23).
Loading...
+ 45 hidden pages