Skip to content

Instantly share code, notes, and snippets.

@jkullick
Created March 12, 2017 21:55
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save jkullick/e872b7d8e5073779563fbc1baf73f598 to your computer and use it in GitHub Desktop.
Save jkullick/e872b7d8e5073779563fbc1baf73f598 to your computer and use it in GitHub Desktop.
Backup & Restore whole Linux System over SSH
# Backup
ssh root@$SSH_HOST "tar cpf - / --exclude=/sys --exclude=/proc --exclude=/dev" | pv | gzip | cat > backup.tar.gz

# Restore
cat backup.tar.gz | ssh root@$SSH_HOST "pv | tar zxvf - -C /"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment