Created
April 16, 2016 07:56
-
-
Save richjenks/46e55b63cad47b4c5fb5658561316d26 to your computer and use it in GitHub Desktop.
Backup & Restore Linux
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Backup system to /backup.tgz | |
sudo su | |
cd / | |
tar cvpzf backup.tgz --exclude=/proc --exclude=/lost+found --exclude=/backup.tgz --exclude=/mnt --exclude=/sys --exclude=/media / |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Restore /backup.tgz to system | |
sudo su | |
cd / | |
tar xvpfz backup.tgz -C / | |
mkdir proc | |
mkdir lost+found | |
mkdir mnt | |
mkdir media | |
mkdir sys |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment