1 |
On Thu, Jan 12, 2012 at 09:47:57AM +0100, Michael Hampicke wrote: |
2 |
> > I'm curious what you, collective Gentoo-users, may be using to solve |
3 |
> > this problem. rsync, rdiff-backup, rsnapshot, dirvish, bacula, |
4 |
> > tar+ssh...? |
5 |
> |
6 |
> rsync -av --delete --delete-excluded \ |
7 |
> --exclude=/dev/ \ |
8 |
> --exclude=/proc/ \ |
9 |
> --exclude=/sys/ \ |
10 |
> --exclude=/tmp/ \ |
11 |
> --exclude=/usr/portage/ \ |
12 |
> --exclude=/var/portage/ \ |
13 |
> --exclude=/var/run/ \ |
14 |
> --exclude=/var/tmp/ \ |
15 |
> / bak@××××××××××××××××.bar:/mnt/backup/machine1/ |
16 |
|
17 |
rsync++ |
18 |
|
19 |
> I exclude the portage tree, no reason to bak it up. emerge --sync and |
20 |
> you're done. |
21 |
|
22 |
You can squash dev, proc and sys all at once with the -x flag. |
23 |
|
24 |
> To restore I just boot into the rescue system of my server hoster and do a |
25 |
> |
26 |
> rsync -av --delete --delete-excluded \ |
27 |
> bak@××××××××××××××××.bar:/mnt/backup/machine1/ / |
28 |
|
29 |
I did the very same recently when reformatting my system partition for a new |
30 |
FS. Beware though that after this command you still need to create some device |
31 |
files in /dev for udev to work properly, because they were excluded. I think |
32 |
it was null and console, but I'm not sure. |
33 |
You can circumvent this if you boot into another system and create those files |
34 |
in the dev directory without dev being mounted. Then the files will be rsynced |
35 |
because they are on the same filesystem. |
36 |
-- |
37 |
Gruß | Greetings | Qapla' |
38 |
I forbid any use of my email addresses with Facebook services. |
39 |
|
40 |
“We all know Linux is great … it does infinite loops in 5 seconds.” |
41 |
– Linus Torvalds |