You can also use gzip Bzip2 instead: this will cause a compression of larger files (an archive smaller) but the process will take longer.
To this solution, just replace "z" with "j" in the options, and name the archive so that it ends with. "Tar.bz2", like this:
Code:
cvpjf backup.tar.bz2 tar - exclude = / backup.tar.bz2 - exclude = / lost + found - exclude = / media /
Be careful here: the manipulation below replace each file with their "counterpart" in the archive, so be sure what you do.
Backup.tgz Place the file in the root file system, then put you in as root (sudo su) and put you in the root (cd /)
Here is the command to restore any type:
Code:
Xvpfz backup.tgz tar-C /
Or in the case of using Bzip2 to replace gzip:
Code:
Xvpfj backup.tar.bz2 tar-C /
Explanations:
Options:
- x: to extract.
- -C: to use the current directory (/) to extract the files.
To restore: type the command, then press enter and wait until the process finishes.
There only one thing: if you have excluded files (eg / lost + found), you must recreate them with the command:
Code:
Mkdir / lost + found
That is: after a system reboot, you'll have a system in the same condition as when creating the backup!
Bookmarks