Backups / Restore¶
How do I move a user to a new server?¶
The current restore function accepts backups generated by both VestaCP and HestiaCP.
- Make a user backup on the old server. In this example we will use "username" as the reference.
v-backup-user username
- Copy tarball to the new server and place it in the /backup directory
scp /backup/username.2020.01.01-00-00.tar [email protected]:/backup/
- Restore backup on the new server
v-restore-user username username.2020.01.01-00-00.tar
Want to restore a different user?
Use
v-restore-user newusername username.2020.01.01-00-00.tar
User accounts that do not exist will be created.
What kind of backups are able to be restored?¶
Currently HestiaCP only support backups of:
- HestiaCP
- VestaCP
How to increase the number of backups¶
- Log into HestiaCP as admin user
- Click on "Packages" button
- On the displayed list, hover the mouse pointer above the "default" package and click on the "Copy" button
- A "default-copy" package will be created. Hover the mouse pointer above the newly created package and click on the "Edit Package" button
- On the "Package Name" field, type the name you whish to give to the new package, and then in the "Backups" field type the number of backups you would like to set, then click on the "Save" button
- Click on the "USERS" menu
- Now hover the mouse pointer above the user to which you would like to assign the newly created package, and then click on "Edit User" button
- In the "Package" field select with the drop-down menu the name of the newly created package and finally click on the "Save" button.
What is the difference between zstd and gzip¶
ZSTD was developed by Facebook as a replacement. During testing we found a significant speed increase and lower disk space usage against gzip.
For more information see https://github.com/facebook/zstd
What is the optimal compression ratio¶
Higher the number how better the compression ratio. During the testing we discoverd that "ZSTD" level 3 compares agains level 9 for disk space how ever much faster. ZSTD level 11 took the same time but an smaller small size. Level higher then 19 should never be used as zstd becomes terrible slow.
What kind of protocols are currently supported¶
Currently supported backup protocols are:
- FTP
- SFTP
- Backblaze / B2 Protocol
How to setup a (S)FTP Backup server¶
Login on a server as root and run following command
v-add-backup-host ftp remote.ftp-host.ltd backup-user p4ssw0rd [/path-backups/] [port]
For SFTP
v-add-backup-host sftp remote.ftp-host.ltd backup-user p4ssw0rd [/path-backups/] [port]
For Backblaze / B2
v-add-backup-host b2 bucketName keyID applicationKey
Arguments between brackets [] may be omitted
How to change default backup folder¶
Due to security reasons, symlinks are not allowed. To change the default backup folder, you can do the following:
- Make sure backup folder to set to /backup/
- If it ever had something in it, delete and recreate it, using your FTP client or by typing "mkdir backup" in console.
- Mount desired folder to backup, using mount:
mount --bind /path/to/new/backup/folder /backup
For a permanent fix you should add a record to fstab, so this folder would load on your system boot:
- Open /etc/fstab
- Add the following line to the end:
/path/to/new/backup/folder /backup none defaults,bind 0 0
- Save the file.
How to extract .zstd file¶
Follow the instructions below or use Winrar 6.10 or later to uppack .zstd
How to untar the domain_data.tar.zst in windows using zstd.exe¶
1. you'll have to download the zstd.exe for windows, found in: https://github.com/facebook/zstd/releases/ depending on your version of windows:
zstd-v*-*.*-win32.zip
zstd-v*-*.*-win64.zip
- decompress the program that you've downloaded (the zstd zip file)
- to decompress the backup, use the following command:
{dir_to_zstd}\zstd.exe -o {dir_to_file}\{file}.tar.zst
Example:
c:\Users\{user}\Downloads\zstd-v1.4.4-win64\zstd.exe -d c:\Users\{user}\Downloads\admin.2021-06-27_05-48-23\web\{domain}\domain_data.tar.zst
output:
c:\Users\{user}\Downloads\admin.2021-06-27_05-48-23\web\{domain}\domain_data.tar.zst: 61440 bytes
- the use your favorite program to untar the resulting tar, and you are done.
In this case, the tar was outputted to
c:\Users\{user}\Downloads\admin.2021-06-27_05-48-23\web\{domain}\domain_data.tar