Here is how to backup a VPS “from the inside”
Create a directory for the container:
mkdir /backup
Create an archive vpsbackup.tar.gz of all files and place it in this folder:
tar -zcvpf /backup/vpsbackup.tar.gz --directory=/ --exclude=proc --exclude=sys --exclude=dev/pts --exclude=backup .
After a few minutes, depending on the disk size, the backup will be created.
![How to backup a VPS from the inside MobaXterm Personal 20.3 L2R6UCkkiZ - How to backup a VPS from the inside](https://i0.wp.com/pcx3.com/wp-content/uploads/2022/08/MobaXterm_Personal_20.3_L2R6UCkkiZ.png?resize=471%2C50&ssl=1)
Send the backup to a remote server:
scp vpsbackup.tar.gz user@host:/path/to/copy
Extract files on another server:
tar -C /path/to/extract -zxvpf vpsbackup.tar.gz