Posted by & filed under ubuntu backup back up restore tar sudo su cd / simple overnight sleep bed broken fix useful.

This is a simple to way to back up your ubuntu installation. Copy and paste this code to backup all your files:

sudo su
cd /
tar cvpzf backup.tgz –exclude=/proc –exclude=/lost+found –exclude=/backup.tgz –exclude=/mnt –exclude=/sys –exclude=/media /

Copy and Paste this into the terminal to restore to that backup:

sudo tar xvpfz backup.tgz -C /

It is best to backup or restore when you are not using the computer. I run it when I got to sleep.