Auto-backup service: backup restore
Auto-backup service allows to backup both virtual servers with ISPmanager control panel and without it — VPS with Ubuntu, CentOS and Debian operating systems.
Restoration guide requires some experience with server console (command line). If you need help to restore a backup, feel free to contact us in your Client Area —
Support tickets section. We will restore the necessary backup copy.
If you use the ISPmanager control panel, the restoration process is simple and automatic. To restore backup manually, connect to your server by SSH or VNC.
Auto-backup service system creates full (weekly) and differential (daily) backups. Its differ by meaning and content.
The full backup archive contains all files in the saving directories at the backup creation moment. The system creates full backup after the auto-backup option was enabled by schedule and after that — weekly on Sundays. You can recognize it by «F» symbol in the archive name first letter.
The differential backup archive contains the copies of files, that were changed since the last full copy creation. The system creates differential backups daily from Monday till Saturday. You can recognize it by «I» symbol in the archive name first letter.
Differential copies depend on full ones. To restore the data for required date, you need to restore first the last full backup (for the last Sunday before the required date), and then — differential archive for the required date with data replacement.
To save your server disk space each backup copy creates by 100 Mb fragments, «slices». After slice creation, it is uploading to external storage and is removing from your server. Then new slice creation starts — and so on until the full backup won’t be uploaded to storage. It helps to save server resources — disk space and network traffic.
To start the restoration you need to build and unpack the backup archive because it is still split up for «slices». The best tool for it is
isptar utility from ISPmanager control panel developers — ISPsystem company. It will help build and restore the backup automatically, but you need to download the copy to your server first.
External storage can be presented in two versions.
- Standard FTP storage
- Cloud S3 Storage
You can define the type of storage your server uses by using the Instruction service in your Personal Area. You will also find access to the backup storage there. In order to do so, go to Products/Services — Virtual private servers, select the server you need from the list, and click «Instructions». The «Auto-backup» section contains the access data.
Restore from FTP storage
Let's imagine that we discovered the required data:
For example, we will restore the backup for
Connect to server by SSH and run some commands in the console:
- To download the last full backup (for the last Sunday — it is
2020-04-19for this example):
wget -r 'ftp://ftp-user:firstname.lastname@example.org/ftp-user/2020-04-19'
- To download the necessary differential backup (for the required date — it is
2020-04-22for this example):
wget -r 'ftp://ftp-user:email@example.com/ftp-user/2020-04-22'
- Create the directory for restored data:
- Navigate to the directory with downloaded differential archive for required date:
Restore from S3 storage
Let’s suppose we figured out the access to the storage and now need to restore the copy made on
- First of all, we install and configure the client to work with S3:
apt install -y s3cmd
yum install -y s3cmd
- After that we need to create the configuration:
s3cmd --access_key=key --secret_key=secret --region=RegionOne --host=https://s3backup.hoztnode.net --host-bucket="https://s3backup.hoztnode.net/%(bucket)" --dump-config >~/.s3cfg
- For downloading a full copy (last Sunday before the desired date):
s3cmd sync s3://bucket/user/2020-04-19 ./
- For downloading a differential copy (for the desired date):
s3cmd sync s3://bucket/user/2020-04-22 ./
- Now let's open the directory with the archive we downloaded:
Unpacking the archive
Let's create a directory for unpacking now:
- If you want to unpack the entire archive:
/opt/autobackup/isptar --extract I2020-04-22.user.tgz --base ../2020-04-19/F2020-04-19.user.tgz --root /root/restore
- If you need to unpack a single directiory data/etc, that is kept in the archive:
/opt/autobackup/isptar --extract I2020-04-22.user.tgz --base ../2020-04-19/F2020-04-19.user.tgz --root /root/restore data/etc