特殊:Badtitle/NS100:BackupYourSystem/TAR:修订间差异
小 新页面: {{From|https://help.ubuntu.com/community/BackupYourSystem/TAR}} {{Languages|UbuntuHelp:BackupYourSystem/TAR}} This page is part of the BackupYourSystem series of Howtos. '''Note: This pa... |
小无编辑摘要 |
||
第3行: | 第3行: | ||
This page is part of the BackupYourSystem series of Howtos. | This page is part of the BackupYourSystem series of Howtos. | ||
'''Note: | '''Note: Use at your own risk. It is recommended that you read the whole page before doing anything''' | ||
This guide to backup your system using tar to create compressed archives was taken from the post on the Ubuntu Forum written by Heliode. See the thread for discussion: http://www.ubuntuforums.org/showthread.php?t=35087 | This guide to backup your system using tar to create compressed archives was taken from the post on the Ubuntu Forum written by Heliode. See the thread for discussion: http://www.ubuntuforums.org/showthread.php?t=35087 | ||
第32行: | 第32行: | ||
<pre><nowiki> | <pre><nowiki> | ||
sudo | sudo -s -H | ||
</nowiki></pre> | </nowiki></pre> | ||
第177行: | 第177行: | ||
**** [http://weichen.wordpress.com/2007/01/01/howto-backup-my-ubuntu/ "Wei’s world: HOWTO: backup my Ubuntu"] | **** [http://weichen.wordpress.com/2007/01/01/howto-backup-my-ubuntu/ "Wei’s world: HOWTO: backup my Ubuntu"] | ||
[[category:CategoryDocumentation | [[category:CategoryDocumentation]] | ||
[[category:UbuntuHelp]] | [[category:UbuntuHelp]] |
2007年11月22日 (四) 12:04的版本
文章出处: |
{{#if: | {{{2}}} | https://help.ubuntu.com/community/BackupYourSystem/TAR }} |
点击翻译: |
English {{#ifexist: {{#if: UbuntuHelp:BackupYourSystem/TAR | UbuntuHelp:BackupYourSystem/TAR | {{#if: | :}}BackupYourSystem/TAR}}/af | • {{#if: UbuntuHelp:BackupYourSystem/TAR|Afrikaans| [[::BackupYourSystem/TAR/af|Afrikaans]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BackupYourSystem/TAR | UbuntuHelp:BackupYourSystem/TAR | {{#if: | :}}BackupYourSystem/TAR}}/ar | • {{#if: UbuntuHelp:BackupYourSystem/TAR|العربية| [[::BackupYourSystem/TAR/ar|العربية]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BackupYourSystem/TAR | UbuntuHelp:BackupYourSystem/TAR | {{#if: | :}}BackupYourSystem/TAR}}/az | • {{#if: UbuntuHelp:BackupYourSystem/TAR|azərbaycanca| [[::BackupYourSystem/TAR/az|azərbaycanca]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BackupYourSystem/TAR | UbuntuHelp:BackupYourSystem/TAR | {{#if: | :}}BackupYourSystem/TAR}}/bcc | • {{#if: UbuntuHelp:BackupYourSystem/TAR|جهلسری بلوچی| [[::BackupYourSystem/TAR/bcc|جهلسری بلوچی]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BackupYourSystem/TAR | UbuntuHelp:BackupYourSystem/TAR | {{#if: | :}}BackupYourSystem/TAR}}/bg | • {{#if: UbuntuHelp:BackupYourSystem/TAR|български| [[::BackupYourSystem/TAR/bg|български]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BackupYourSystem/TAR | UbuntuHelp:BackupYourSystem/TAR | {{#if: | :}}BackupYourSystem/TAR}}/br | • {{#if: UbuntuHelp:BackupYourSystem/TAR|brezhoneg| [[::BackupYourSystem/TAR/br|brezhoneg]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BackupYourSystem/TAR | UbuntuHelp:BackupYourSystem/TAR | {{#if: | :}}BackupYourSystem/TAR}}/ca | • {{#if: UbuntuHelp:BackupYourSystem/TAR|català| [[::BackupYourSystem/TAR/ca|català]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BackupYourSystem/TAR | UbuntuHelp:BackupYourSystem/TAR | {{#if: | :}}BackupYourSystem/TAR}}/cs | • {{#if: UbuntuHelp:BackupYourSystem/TAR|čeština| [[::BackupYourSystem/TAR/cs|čeština]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BackupYourSystem/TAR | UbuntuHelp:BackupYourSystem/TAR | {{#if: | :}}BackupYourSystem/TAR}}/de | • {{#if: UbuntuHelp:BackupYourSystem/TAR|Deutsch| [[::BackupYourSystem/TAR/de|Deutsch]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BackupYourSystem/TAR | UbuntuHelp:BackupYourSystem/TAR | {{#if: | :}}BackupYourSystem/TAR}}/el | • {{#if: UbuntuHelp:BackupYourSystem/TAR|Ελληνικά| [[::BackupYourSystem/TAR/el|Ελληνικά]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BackupYourSystem/TAR | UbuntuHelp:BackupYourSystem/TAR | {{#if: | :}}BackupYourSystem/TAR}}/es | • {{#if: UbuntuHelp:BackupYourSystem/TAR|español| [[::BackupYourSystem/TAR/es|español]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BackupYourSystem/TAR | UbuntuHelp:BackupYourSystem/TAR | {{#if: | :}}BackupYourSystem/TAR}}/fa | • {{#if: UbuntuHelp:BackupYourSystem/TAR|فارسی| [[::BackupYourSystem/TAR/fa|فارسی]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BackupYourSystem/TAR | UbuntuHelp:BackupYourSystem/TAR | {{#if: | :}}BackupYourSystem/TAR}}/fi | • {{#if: UbuntuHelp:BackupYourSystem/TAR|suomi| [[::BackupYourSystem/TAR/fi|suomi]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BackupYourSystem/TAR | UbuntuHelp:BackupYourSystem/TAR | {{#if: | :}}BackupYourSystem/TAR}}/fr | • {{#if: UbuntuHelp:BackupYourSystem/TAR|français| [[::BackupYourSystem/TAR/fr|français]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BackupYourSystem/TAR | UbuntuHelp:BackupYourSystem/TAR | {{#if: | :}}BackupYourSystem/TAR}}/gu | • {{#if: UbuntuHelp:BackupYourSystem/TAR|ગુજરાતી| [[::BackupYourSystem/TAR/gu|ગુજરાતી]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BackupYourSystem/TAR | UbuntuHelp:BackupYourSystem/TAR | {{#if: | :}}BackupYourSystem/TAR}}/he | • {{#if: UbuntuHelp:BackupYourSystem/TAR|עברית| [[::BackupYourSystem/TAR/he|עברית]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BackupYourSystem/TAR | UbuntuHelp:BackupYourSystem/TAR | {{#if: | :}}BackupYourSystem/TAR}}/hu | • {{#if: UbuntuHelp:BackupYourSystem/TAR|magyar| [[::BackupYourSystem/TAR/hu|magyar]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BackupYourSystem/TAR | UbuntuHelp:BackupYourSystem/TAR | {{#if: | :}}BackupYourSystem/TAR}}/id | • {{#if: UbuntuHelp:BackupYourSystem/TAR|Bahasa Indonesia| [[::BackupYourSystem/TAR/id|Bahasa Indonesia]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BackupYourSystem/TAR | UbuntuHelp:BackupYourSystem/TAR | {{#if: | :}}BackupYourSystem/TAR}}/it | • {{#if: UbuntuHelp:BackupYourSystem/TAR|italiano| [[::BackupYourSystem/TAR/it|italiano]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BackupYourSystem/TAR | UbuntuHelp:BackupYourSystem/TAR | {{#if: | :}}BackupYourSystem/TAR}}/ja | • {{#if: UbuntuHelp:BackupYourSystem/TAR|日本語| [[::BackupYourSystem/TAR/ja|日本語]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BackupYourSystem/TAR | UbuntuHelp:BackupYourSystem/TAR | {{#if: | :}}BackupYourSystem/TAR}}/ko | • {{#if: UbuntuHelp:BackupYourSystem/TAR|한국어| [[::BackupYourSystem/TAR/ko|한국어]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BackupYourSystem/TAR | UbuntuHelp:BackupYourSystem/TAR | {{#if: | :}}BackupYourSystem/TAR}}/ksh | • {{#if: UbuntuHelp:BackupYourSystem/TAR|Ripoarisch| [[::BackupYourSystem/TAR/ksh|Ripoarisch]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BackupYourSystem/TAR | UbuntuHelp:BackupYourSystem/TAR | {{#if: | :}}BackupYourSystem/TAR}}/mr | • {{#if: UbuntuHelp:BackupYourSystem/TAR|मराठी| [[::BackupYourSystem/TAR/mr|मराठी]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BackupYourSystem/TAR | UbuntuHelp:BackupYourSystem/TAR | {{#if: | :}}BackupYourSystem/TAR}}/ms | • {{#if: UbuntuHelp:BackupYourSystem/TAR|Bahasa Melayu| [[::BackupYourSystem/TAR/ms|Bahasa Melayu]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BackupYourSystem/TAR | UbuntuHelp:BackupYourSystem/TAR | {{#if: | :}}BackupYourSystem/TAR}}/nl | • {{#if: UbuntuHelp:BackupYourSystem/TAR|Nederlands| [[::BackupYourSystem/TAR/nl|Nederlands]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BackupYourSystem/TAR | UbuntuHelp:BackupYourSystem/TAR | {{#if: | :}}BackupYourSystem/TAR}}/no | • {{#if: UbuntuHelp:BackupYourSystem/TAR|norsk| [[::BackupYourSystem/TAR/no|norsk]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BackupYourSystem/TAR | UbuntuHelp:BackupYourSystem/TAR | {{#if: | :}}BackupYourSystem/TAR}}/oc | • {{#if: UbuntuHelp:BackupYourSystem/TAR|occitan| [[::BackupYourSystem/TAR/oc|occitan]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BackupYourSystem/TAR | UbuntuHelp:BackupYourSystem/TAR | {{#if: | :}}BackupYourSystem/TAR}}/pl | • {{#if: UbuntuHelp:BackupYourSystem/TAR|polski| [[::BackupYourSystem/TAR/pl|polski]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BackupYourSystem/TAR | UbuntuHelp:BackupYourSystem/TAR | {{#if: | :}}BackupYourSystem/TAR}}/pt | • {{#if: UbuntuHelp:BackupYourSystem/TAR|português| [[::BackupYourSystem/TAR/pt|português]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BackupYourSystem/TAR | UbuntuHelp:BackupYourSystem/TAR | {{#if: | :}}BackupYourSystem/TAR}}/ro | • {{#if: UbuntuHelp:BackupYourSystem/TAR|română| [[::BackupYourSystem/TAR/ro|română]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BackupYourSystem/TAR | UbuntuHelp:BackupYourSystem/TAR | {{#if: | :}}BackupYourSystem/TAR}}/ru | • {{#if: UbuntuHelp:BackupYourSystem/TAR|русский| [[::BackupYourSystem/TAR/ru|русский]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BackupYourSystem/TAR | UbuntuHelp:BackupYourSystem/TAR | {{#if: | :}}BackupYourSystem/TAR}}/si | • {{#if: UbuntuHelp:BackupYourSystem/TAR|සිංහල| [[::BackupYourSystem/TAR/si|සිංහල]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BackupYourSystem/TAR | UbuntuHelp:BackupYourSystem/TAR | {{#if: | :}}BackupYourSystem/TAR}}/sq | • {{#if: UbuntuHelp:BackupYourSystem/TAR|shqip| [[::BackupYourSystem/TAR/sq|shqip]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BackupYourSystem/TAR | UbuntuHelp:BackupYourSystem/TAR | {{#if: | :}}BackupYourSystem/TAR}}/sr | • {{#if: UbuntuHelp:BackupYourSystem/TAR|српски / srpski| [[::BackupYourSystem/TAR/sr|српски / srpski]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BackupYourSystem/TAR | UbuntuHelp:BackupYourSystem/TAR | {{#if: | :}}BackupYourSystem/TAR}}/sv | • {{#if: UbuntuHelp:BackupYourSystem/TAR|svenska| [[::BackupYourSystem/TAR/sv|svenska]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BackupYourSystem/TAR | UbuntuHelp:BackupYourSystem/TAR | {{#if: | :}}BackupYourSystem/TAR}}/th | • {{#if: UbuntuHelp:BackupYourSystem/TAR|ไทย| [[::BackupYourSystem/TAR/th|ไทย]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BackupYourSystem/TAR | UbuntuHelp:BackupYourSystem/TAR | {{#if: | :}}BackupYourSystem/TAR}}/tr | • {{#if: UbuntuHelp:BackupYourSystem/TAR|Türkçe| [[::BackupYourSystem/TAR/tr|Türkçe]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BackupYourSystem/TAR | UbuntuHelp:BackupYourSystem/TAR | {{#if: | :}}BackupYourSystem/TAR}}/vi | • {{#if: UbuntuHelp:BackupYourSystem/TAR|Tiếng Việt| [[::BackupYourSystem/TAR/vi|Tiếng Việt]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BackupYourSystem/TAR | UbuntuHelp:BackupYourSystem/TAR | {{#if: | :}}BackupYourSystem/TAR}}/yue | • {{#if: UbuntuHelp:BackupYourSystem/TAR|粵語| [[::BackupYourSystem/TAR/yue|粵語]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BackupYourSystem/TAR | UbuntuHelp:BackupYourSystem/TAR | {{#if: | :}}BackupYourSystem/TAR}}/zh | • {{#if: UbuntuHelp:BackupYourSystem/TAR|中文| [[::BackupYourSystem/TAR/zh|中文]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BackupYourSystem/TAR | UbuntuHelp:BackupYourSystem/TAR | {{#if: | :}}BackupYourSystem/TAR}}/zh-hans | • {{#if: UbuntuHelp:BackupYourSystem/TAR|中文(简体)| [[::BackupYourSystem/TAR/zh-hans|中文(简体)]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BackupYourSystem/TAR | UbuntuHelp:BackupYourSystem/TAR | {{#if: | :}}BackupYourSystem/TAR}}/zh-hant | • {{#if: UbuntuHelp:BackupYourSystem/TAR|中文(繁體)| [[::BackupYourSystem/TAR/zh-hant|中文(繁體)]]}}|}} |
{{#ifeq:UbuntuHelp:BackupYourSystem/TAR|:BackupYourSystem/TAR|请不要直接编辑翻译本页,本页将定期与来源同步。}} |
{{#ifexist: :BackupYourSystem/TAR/zh | | {{#ifexist: BackupYourSystem/TAR/zh | | {{#ifeq: {{#titleparts:BackupYourSystem/TAR|1|-1|}} | zh | | }} }} }} {{#ifeq: {{#titleparts:BackupYourSystem/TAR|1|-1|}} | zh | | }}
This page is part of the BackupYourSystem series of Howtos.
Note: Use at your own risk. It is recommended that you read the whole page before doing anything
This guide to backup your system using tar to create compressed archives was taken from the post on the Ubuntu Forum written by Heliode. See the thread for discussion: http://www.ubuntuforums.org/showthread.php?t=35087
Introduction
Hi, and welcome to the Heliode guide to successful backing-up and restoring of a Linux system!
Most of you have probably used Windows before you started using Ubuntu. During that time you might have needed to backup and restore your system. For Windows you would need proprietary software for which you would have to reboot your machine and boot into a special environment in which you could perform the backing-up/restoring (programs like Norton Ghost). During that time you might have wondered why it wasn't possible to just add the whole c:\ to a big zip-file. This is impossible because in Windows, there are lots of files you can't copy or overwrite while they are being used, and therefore you needed specialized software to handle this.
Well, I'm here to tell you that those things, just like rebooting, are Windows Crazy Things (tm). There's no need to use programs like Ghost to create backups of your Ubuntu system (or any Linux system, for that matter). In fact; using Ghost might be a very bad idea if you are using anything but ext2. Ext3, the default Ubuntu partition, is seen by Ghost as a damaged ext2 partition and does a very good job at screwing up your data.
Preparing the Ground
Just a quick note... you're about to back up your entire system. So don't forget to empty your Wastebasket, and any useless files you have hanging around in your /home directory or on the Desktop.
Depending on why you're backing up you may want to delete all your emails, clear your browser search history and wipe your saved browser personal details. I do back all of those up, but if you're particularly security conscious you may not want to.
Backing Up
"What should I use to backup my system then?" you might ask. Easy; the same thing you use to backup/compress everything else; TAR. Unlike Windows, Linux doesn't restrict root access to anything, so you can just throw every single file on a partition in a TAR file!
To do this, become root with
sudo -s -H
and go to the root of your file system (we use this in our example, but you can go anywhere you want your backup to end up, including remote or removable drives.)
cd /
Now, below is the full command I would use to make a backup of my system:
tar -cvzf /backup.tgz --exclude=/proc --exclude=/lost+found --exclude=/backup.tgz --exclude=/mnt --exclude=/sys /
Now, lets explain this a little bit:
- 'tar' is the program used to do a backup
- c - create a new backup archive
- v - verbose mode, tar will print what it's doing to the screen
- z - compress the backup file with 'gzip' to make it smaller
- f <filename> - specifies where to store the backup, /backup.tgz is the file used in this example
- Now come the directories we want to exclude. We don't want to backup everything since some dirs aren't very useful to include. Also make sure you don't include the file itself, or else you'll get weird results. You might also not want to include the /mnt folder if you have other partitions mounted there or you'll end up backing those up too. Also make sure you don't have anything mounted in /media (i.e. don't have any cd's or removable media mounted). Either that or exclude /media.
- After all of the options is the directory we want to backup. Since we want to backup everything we use / for the root directory
If you want to exclude all other file systems you can use the --one-file-system option in addition to or instead of --exclude. With the --one-file-system option, only the "local" file system is backed up, that is, only the file system which you specify and not the file systems mounted under it in the file hierarchy. Use "df" to see which file systems you have mounted. The above command would thus be:
tar -cvzf /backup.tgz --one-file-system --exclude=/lost+found --exclude=/backup.tgz /
EDIT: kvidell suggests on the forum thread that we also exclude the /dev directory. I have other evidence that says it is very unwise to do so though.
Well, if the command agrees with you, hit enter (or return, whatever) and sit back and relax. This might take a while.
Afterwards you'll have a file called backup.tgz, which is probably pretty large, in the root of your filesystem. Now you can burn it to DVD or move it to another machine; whatever you like!
WARNING: Files that are bigger than 2GB (a little less actually) are not supported by ISO9660 and may or may not be restoreable. So don't simply burn a DVD with a huge .iso file on it. Split it up using the command split (see man page) or use a different way to get it onto the DVD. One possibility (untested) is the following:
sudo tar --create --bzip2 --exclude /tmp --one-file-system --sparse / | growisofs -use-the-force-luke -Z /dev/hda=/proc/self/fd/0
Note that this only backs up one file system. You might want to use --exclude instead of --one-file-system to filter out the stuff you don't want backed up. This assumes your DVD drive is /dev/hda. This will not create a mountable DVD. To restore it you will reference the device file:
sudo tar --extract --bzip2 --file /dev/hda
EDIT2: At the end of the process you might get a message along the lines of 'tar: Error exit delayed from previous errors' or something, but in most cases you can just ignore that.
Alternatively, you can use Bzip2 to compress your backup. This means higher compression but lower speed. If compression is important to you, just substitute the 'z' in the command with 'j', and give the backup the right extension. That would make the command look like this:
tar -cvpjf /backup.tar.bz2 --exclude=/proc --exclude=/lost+found --exclude=/backup.tar.bz2 --exclude=/mnt --exclude=/sys /
Backup over network
If the file system is low on space and you can't mount another file system to store the backup file on it is possible to use netcat to transfer the backup between computers.
On the receiving end you'll setup netcat to write the backup file like this:
nc -l -p 1024 > backup.tar.bz2
Then you pipe the tar command without the 'f' flag through netcat on the sending end like this:
tar -cvj <all those other options> / | nc -q 0 <receiving host> 1024
In the above commands 1024 is just a random port number, anything from 1024 and up should work.
If all goes well the backup will be piped through the network without touching the file system being read. With a really fast network this could actually be faster then writing the backup file back to disk.
A variation (which I just dreamed up, so I can't testify on its reliability) on the above is this command:
tar -cvj <all those other options> / | ssh <remote host> "cat > backup.tar.bz2"
edit: GlennBooth I have successfully used the command line below to backup files between two Ubuntu 6.06 machines using ssh (a slight variation on the command above):
tar zcvf - /home | ssh <backuphost> "( cat > home_bkp.tar.gz )"
Here the directory to backup is /home, and the backup file will end up as home_bkp.tar.gz on the machine called <backuphost>. Obviously you can adjust the directories to be backed up to suit. The hyphen before /home tells tar to send output to stdout rather than to a file. Adding the 'p' option to tar is probably a good idea to preserve permissions.
Restoring
Warning: Please, for goodness sake, be careful here. If you don't understand what you are doing here you might end up overwriting stuff that is important to you, so please take care!
Well continue with our example from the previous chapter which created the file backup.tgz in the root directory.
Once again, make sure you are root and that you and the backup file are in the root of the file system.
One of the beautiful things of Linux is that this will even work on a running system; no need to screw around with boot-cd's or anything. Of course, if you've rendered your system unbootable you might have no choice but to use a live cd but the results are the same. You can even remove every single file of a Linux system while it is running with one command. I'm not giving you that command though!
Well, back on-topic. This is the command that I would use:
tar -xvpzf /backup.tgz -C /
Or if you used bz2;
tar -xvpjf backup.tar.bz2 -C /
The x option tells tar to extract the file. The -C <directory> option tells tar to change to a specific directory ( / in this example ) before extracting. The p option (preserve permissions) restores all file permissions as they originally were (default for superuser).
WARNING: this will overwrite every single file on your partition with the one in the archive! So any files that exist on your computer have a chance of being overwritten! Back them up for safe keeping!
Just hit enter/return/your brother/whatever and watch the fireworks. Again, this might take a while. When it is done, you have a fully restored Ubuntu system! Just make sure, before you do anything else, that you re-create the directories which were excluded ( /proc, /lost+found, /mnt, /sys, etc.).
mkdir /proc /lost+found /mnt /sys
And when you reboot, everything should be the way it was when you made the backup!
Comments
(It may not be *exactly* the way it was when you made the backup, because files created after the backing up won't be deleted).
Other people using the "tar" method: