Backing up VPS from the inside

This guide will show you how to backup your vsp/container "from the inside vps".
First of all create a directory in which you will backup your container.

mkdir /backup

Below command creates an archive named ctbackup.tar.gz in folder you have created earlier.

tar -zcvpf /backup/ctbackup.tar.gz --directory=/ --exclude=proc --exclude=sys --exclude=dev/pts --exclude=backup .

The backup can be sent to remote server:

scp ctbackup.tar.gz user@host:/path/to/copy

To extract files type:

tar -C /path/to/extract -zxvpf ctbackup.tar.gz

 

Was this answer helpful?

 Print this Article

Also Read

Usefull linux tools

please note: for installing some toosl you ned to connect EPEL repo first. htop -extened version...

NFS on Centos 6

How to install NFS on Centos 6 yum install nfs-utils nfs-utils-lib Set nfs to start...

Adding a new disk drive to Centos 6

Installing a new HDD The disk drives in Centos is named hd* or sd*. In system with only one...

Set hostname

Set host name on Centos: /etc/sysconfig/network   HOSTNAME="mycomputer"...

php increase max file size upload

For increase maximum size of uploads file you should set only one setting in php.ini. Set...