Skip to content

Instantly share code, notes, and snippets.

@code26
Created September 11, 2017 08:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save code26/ccf16bec95ad2dc2a8a7b0fb723a9d49 to your computer and use it in GitHub Desktop.
Save code26/ccf16bec95ad2dc2a8a7b0fb723a9d49 to your computer and use it in GitHub Desktop.
BACKUP/RESTORE VPS
#BACKUP
tar zcvf - --exclude=/proc --exclude=/sys --exclude=/dev / | ssh myuser@backupmachine_ip_addr "cat > /home/myuser/VPSbackup.tar.gz"
#RESTORE
cd /
ssh myuser@backupmachine_ip_addr "cat /home/myuser/VPSbackup.tar.gz" | tar zxvf -
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment