A backup copy is a copy of all websites, databases and user mailboxes. Backups allow the following:
- restoring information in case of problems in the operation of the website;
- restoring the website when moving from server to server;
- saving data in case of possible server failures, software failures, hardware problems, etc.
Backups can be stored on the server with ISPmanager or in an external storage. The following can be used as the external storage:
- Google Drive;
- Amazon S3;
- S3-compatible storage;
- FTP server;
- SFTP server (with connection via SSH).
By default, backups for all users are created automatically once a day. You can customize the backup schedule. Read more about the operating principle of backups in Backup system: general information.
Backups are not performed for directories and files located on mounted devices.
Backups are not performed for directories and files that are symbolic links.
To manage backups, enter Tools → Backup copies.
Configuring backup schedule
When you open the Backup copies section for the first time, ISPmanager offers to configure backup settings. Press OK to enter the settings.
- Specify the Basic settings:
Activate the Enable backups option to run the backup process with the specified settings.
In order to enable/disable backups for a specific user, you need to enable/disable this option in the user settings.
- Select the place to store backups in the Storage type field.
- Specify the Backup copy password.
Specify the settings for the selected storage type:Local directory
- Path to directory — the directory on the server where the backups will be saved.
- Access code — access code to Dropbox. You can follow the link and login to Dropbox. After that, the field will be filled in automatically.
- Path to backup directory — the directory in Dropbox where the backups will be saved.
Amazon S3S3-compatible storage
- Access code — access code to Google Drive. You can follow the link and login to Google Drive. After that, the field will be filled in automatically.
- Path to backups — the directory in Google Drive where the backups will be saved.
- Storage URL — URL for API requests to the storage.
- Key identifier — access key identifier.
- Secret key — secret access key.
- Bucket — container name for storing backups.
- Bucket addressing model:
- subdomain — the URL of the form http[s]://bucket.host[:port][/path] will be used to access the bucket. For example, https://bucket.example.com:5555/backup.
- URL-path — the URL of the form http[s]://host[:port][/path]/bucket/ will be used to access the bucket. For example, https://example.com:7777/backup/bucket.
- Automatically detect the region of the cart — the option is enabled by default. Disable to enter the regional endpoint code.
SFTP server (over SSH)
- Server address — domain name or IP address of the server.
- Port FTP — connection port. Default value — 21.
- Path to backup directory — the directory on the server where the backups will be saved.
- User — FTP user name.
- Password — FTP user password.
- Server URL — domain name or IP address of the server.
- SSH port — connection port. Default value — 22.
— the directory on the server where the backups will be saved.
— type of authorization: password or SSH key. In case of password authorization, ISPmanager will generate a key that will be used to access the remote server.
- Username — SSH user name.
- Password — SSH user password.
- Private key — content of the private SSH key.
- Specify Restrictions on the creation of copies:
Total size in bytes. You can specify a unit of measurement in this field. E.g., 100Mib.
- For local storage, the limit applies to each node of the cluster separately. If this value is exceeded, the oldest backups will be deleted;
- You can leave this field blank; in that case the backups will be stored until the storage runs out of space;
- You can limit the total number of backups using the BackupCountLimit configuration file parameter. The default value of the parameter is 14 (7 daily and 7 weekly backups).
- Maximum number of Full backup copies. A full backup contains all user data. It is created the first time you run a backup and on Sundays.
- Maximum number of Daily backup copies. The daily backup contains changes in user data from the last day. It is created daily, except on Sundays. Read more in Backup system: general information.
In the Exclude files field, specify which files should not be included in the backup. Each exception has to be specified in a new line.
- File paths are set relative to the user's home directory (default is /var/www/username/). E.g., data/.filemgr-tmp;
- You can use the * symbol to replace any characters in the file name.
- In the Exclude databases field, specify which databases should not be included in the backup. Each database has to be specified in a new line.
Specify Advanced settings:
- Set the backup Start time by Server time.
- To encrypt the archive, set the Backup password.
- Press OK.
To change the settings, enter Tools → Backup copies → Settings button.
Creating a backup manually
Under an administrator account
To create a backup manually:
- Enter Backups → Create a backup button.
- Select the backup type:
- full backup, which contains the settings of the control panel and all users;
- control panel settings backup;
- user data backup - select the users you want to back up.
ISPmanager will create a backup. It will be added to the table. The table contains the date of backup creation, the size of the archive, and the backup duration.
If a backup has already been created on a certain date, when you create a backup on that date again, only the data of the users that were not present when creating the previous backup will be added to it.
Example: At 12:00 all users were backed up. At 12:01 the user called John was added to the control panel. At 12:05 the administrator created the backup again. Only John's user data will be included in this backup.
Under a user account
You can create a backup under a user account. To do this:
- Log in under a user account: Users → select a user → Log in as user button.
- Enter Backup copies → New button.
ISPmanager will create a backup and download it to your computer in the tar.gz archive format.
You can create backups this way no more than once an hour. If you press the New button again within an hour after creating the first backup, ISPmanager will download the same archive as the first one.
Restoring data from a backup
Recovery of a user and all user's data
To restore user data from a backup, enter Tools → Backup copies → select the backup→ Details button → select the user → Restore button → OK. When the data are restored, the message "Backup restore has been completed successfully" will appear in the ISPmanager interface.
The existing files are not overwritten. Before the recovery, delete the database with the same name from the server. Otherwise, ISPmanager will add the files to the existing database rather than recover them from a backup.
Recovery of a deleted user
You can recover a deleted user from a backup under a different name. Enter Tools → Backup copies → select the backup → Details button → select the user → Restore as button → specify the User name to which the data will be restored from the backup or Create user with a new name → Ok. In this case, ISPmanager will not restore matching entities. In addition, the backups created under the old name will not be available to the user.
If you recover a deleted user from an earlier backup, the data contained in subsequent backups will not be available to the user.
For example, a user was deleted on March 10, but that user's backups for January and February are available. After restoring the user from the January 15 backup, the backups created later than that date will not be displayed to the user; i.e. the user will not be able to access the backups for the period from January 15 to March 10.
Restoring individual files
To restore individual files from a user backup:
- Log in with a user account: Accounts → Users → select the user → Log in button.
- Open the user's backup: Tools → Backup copies → select the copy → Details button.
- Select the data type — Databases, Mail, Files.
- Select the required files.
- Click the Restore button to restore files from the backup.
When the data are restored, the message "Backup restore has been completed successfully" will appear in the ISPmanager interface.
Downloading the backup
To download one of the backups to the local computer, enter Tools → Backup copies → select the backup → Details button → select the user → Download button. The backup will be downloaded as a tar archive with the file name of YYYY-MM-DD-user.tar.gz.
YYYY-MM-DD — backup creation date
user — user name