rdiff-backup-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [rdiff-backup-users] Trying to backup and restore root-partition...


From: Oliver Kaltenecker
Subject: Re: [rdiff-backup-users] Trying to backup and restore root-partition...
Date: Mon, 10 Nov 2003 11:41:41 +0100
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; de-AT; rv:1.4) Gecko/20030624

Hello Ben,

Ben Escoto schrieb:
Is there anything in /mirror/client/wurzel/boot?  If so, does

    rdiff-backup -r now -v6 /mirror/client/wurzel/boot client::/boot

work?  To get the rest, maybe you could try:

no, there is nothing in /mirror/client/wurzel/boot since there is no directory boot in /mirror/client/wurzel. A "ls -al /mirror/client/wurzel" gives the following:

total 19
drwxr-xr-x   10 root     root          264 Nov  7 11:16 .
drwx------   12 root     root          272 Nov  6 13:15 ..
drwxr-xr-x    2 root     root         2112 Nov  7 11:32 bin
drwxr-xr-x   69 root     root         7224 Nov  7 12:03 etc
drwxr-xr-x    7 root     root         2832 Nov  7 11:33 lib
drwx------    2 root     root           48 Nov  7 11:15 lost+found
drwxr-xr-x    5 root     root          120 Mar 18  2003 media
drwx------    3 root     root          488 Nov 10 09:44 rdiff-backup-data
drwx------   10 root     root          328 Nov 10 09:07 root
drwxr-xr-x    3 root     root         7424 Nov  7 11:31 sbin


    ssh address@hidden umount /boot
    rdiff-backup -r now -v6 /mirror/client/wurzel/boot client::/

(I agree this is unnecessary, but I'm trying to figure out what the
problem is.)

At first I unmounted boot and did the rdiff-backup as you wrote above. Seconds later I realized, that I had to rebuild the machine since everything not in /mirror/client/wurzel (for example /dev, /boot, etc.) was deleted. I then remembered a passage somewhere in the docu of that behaviour. Since the machine was just a test environment it wasn't hard to recover. A second trial with the following commands for backup

# rdiff-backup --force --print-statistics --exclude-device-files --exclude-other-filesystems --exclude /work --exclude /var --exclude /usr --exclude /srv --exclude /opt --exclude /local --exclude /boot --exclude /cdrom --exclude /dev --exclude /mnt --exclude /proc --exclude /home --exclude /tmp client::/ /mirror/client/wurzel

and restore

# rdiff-backup --force --print-statistics --exclude-device-files --exclude-other-filesystems --exclude /work --exclude /var --exclude /usr --exclude /srv --exclude /opt --exclude /local --exclude /boot --exclude /cdrom --exclude /dev --exclude /mnt --exclude /proc --exclude /home --exclude /tmp -r now -v6 /mirror/client/wurzel client::/

gave the following:

Using mirror root directory /mirror/client/wurzel
Executing ssh -C client rdiff-backup --server
Using mirror root directory /mirror/client/wurzel
Starting restore of /mirror/client/wurzel to / as it was as of Mon Nov 10 09:45:26 2003.
Sending back exception devloc of type exceptions.KeyError:
File "/usr/lib/python2.2/site-packages/rdiff_backup/connection.py", line 329, in answer_request
    result = apply(eval(request.function_string), argument_list)
File "/usr/lib/python2.2/site-packages/rdiff_backup/connection.py", line 475, in readfromid
    if length is None: return cls.vfiles[id].read()
File "/usr/lib/python2.2/site-packages/rdiff_backup/iterfile.py", line 285, in read
    if not self.addtobuffer(): break
File "/usr/lib/python2.2/site-packages/rdiff_backup/iterfile.py", line 308, in addtobuffer
    try: currentobj = self.iter.next()
File "/usr/lib/python2.2/site-packages/rdiff_backup/restore.py", line 227, in get_diffs_from_collated
    for mir_rorp, target_rorp in collated:
File "/usr/lib/python2.2/site-packages/rdiff_backup/rorpiter.py", line 92, in Collate2Iters
    try: relem1 = riter1.next()
File "/usr/lib/python2.2/site-packages/rdiff_backup/selection.py", line 652, in next
    self.ITR(next_rorp.index, next_rp, next_rorp)
File "/usr/lib/python2.2/site-packages/rdiff_backup/rorpiter.py", line 266, in __call__
    else: self.root_branch.start_process(*args)
File "/usr/lib/python2.2/site-packages/rdiff_backup/selection.py", line 690, in start_process s = self.select(neSending back exception devloc of type exceptions.KeyError: File "/usr/lib/python2.2/site-packages/rdiff_backup/connection.py", line 329, in answer_request
    result = apply(eval(request.function_string), argument_list)
File "/usr/lib/python2.2/site-packages/rdiff_backup/restore.py", line 268, in patch
    for diff in rorpiter.FillInIter(diff_iter, target):
File "/usr/lib/python2.2/site-packages/rdiff_backup/rorpiter.py", line 173, in FillInIter
    first_rp = rpiter.next() # StopIteration gets passed upwards
File "/usr/lib/python2.2/site-packages/rdiff_backup/iterfile.py", line 364, in next
    while not type: type, data = self._get()
File "/usr/lib/python2.2/site-packages/rdiff_backup/iterfile.py", line 401, in _get
    if not self.buf: self.buf += self.file.read()
File "/usr/lib/python2.2/site-packages/rdiff_backup/connection.py", line 508, in read
    return self.connection.VirtualFile.readfromid(self.id, length)
File "/usr/lib/python2.2/site-packages/rdiff_backup/connection.py", line 440, in __call__
    return apply(self.connection.reval, (self.name,) + args)
File "/usr/lib/python2.2/site-packages/rdiff_backup/connection.py", line 362, in reval
    if isinstance(result, Exception): raise result

xt_rp)
File "/usr/lib/python2.2/site-packages/rdiff_backup/selection.py", line 213, in Select
    result = sf(rp)
File "/usr/lib/python2.2/site-packages/rdiff_backup/selection.py", line 435, in sel_func
    if rp.getdevloc() == root_devloc: return None
File "/usr/lib/python2.2/site-packages/rdiff_backup/rpath.py", line 434, in getdevloc
    return self.data['devloc']

Traceback (most recent call last):
  File "/usr/bin/rdiff-backup", line 24, in ?
    rdiff_backup.Main.Main(sys.argv[1:])
File "/usr/lib/python2.2/site-packages/rdiff_backup/Main.py", line 250, in Main
    take_action(rps)
File "/usr/lib/python2.2/site-packages/rdiff_backup/Main.py", line 224, in take_action
    elif action == "restore-as-of": RestoreAsOf(rps[0], rps[1])
File "/usr/lib/python2.2/site-packages/rdiff_backup/Main.py", line 395, in RestoreAsOf
    restore_common(rpin, target, time)
File "/usr/lib/python2.2/site-packages/rdiff_backup/Main.py", line 407, in restore_common
    restore.Restore(mirror, inc_rpath, target, time)
File "/usr/lib/python2.2/site-packages/rdiff_backup/restore.py", line 50, in Restore
    TargetS.patch(target, diff_iter)
File "/usr/lib/python2.2/site-packages/rdiff_backup/connection.py", line 440, in __call__
    return apply(self.connection.reval, (self.name,) + args)
File "/usr/lib/python2.2/site-packages/rdiff_backup/connection.py", line 362, in reval
    if isinstance(result, Exception): raise result
KeyError: devloc
Traceback (most recent call last):
  File "/usr/bin/rdiff-backup", line 24, in ?
    rdiff_backup.Main.Main(sys.argv[1:])
File "/usr/lib/python2.2/site-packages/rdiff_backup/Main.py", line 250, in Main
    take_action(rps)
File "/usr/lib/python2.2/site-packages/rdiff_backup/Main.py", line 220, in take_action
    connection.PipeConnection(sys.stdin, sys.stdout).Server()
File "/usr/lib/python2.2/site-packages/rdiff_backup/connection.py", line 347, in Server
    self.get_response(-1)
File "/usr/lib/python2.2/site-packages/rdiff_backup/connection.py", line 309, in get_response
    try: req_num, object = self._get()
File "/usr/lib/python2.2/site-packages/rdiff_backup/connection.py", line 225, in _get
    raise ConnectionReadError("Truncated header string (problem "
rdiff_backup.connection.ConnectionReadError: Truncated header string (problem probably originated remotely)


Afterwards I tried it again excluding /lost+found and /media as well but received the same messages.

I then removed the option --exclude-other-filesystems as in

# rdiff-backup --force --print-statistics --exclude-device-files --exclude /work --exclude /var --exclude /usr --exclude /srv --exclude /opt --exclude /local --exclude /boot --exclude /cdrom --exclude /dev --exclude /mnt --exclude /proc --exclude /home --exclude /tmp --exclude /lost\+found --exclude /media -r now -v6 /mirror/client/wurzel client::/

This gave the following:

Processing changed file .
Processing changed file boot
Regular copying ('boot',) to /rdiff-backup.tmp.0
Processing changed file dev
Removing directory /boot
Regular copying ('dev',) to /rdiff-backup.tmp.1
Processing changed file dev/3dfx
Regular copying ('dev', '3dfx') to /dev/rdiff-backup.tmp.2
Processing changed file dev/:0
Regular copying ('dev', ':0') to /dev/rdiff-backup.tmp.3
Processing changed file dev/:1
Regular copying ('dev', ':1') to /dev/rdiff-backup.tmp.4
Processing changed file dev/:2
Regular copying ('dev', ':2') to /dev/rdiff-backup.tmp.5
Processing changed file dev/:3
Regular copying ('dev', ':3') to /dev/rdiff-backup.tmp.6
Processing changed file dev/:4
Regular copying ('dev', ':4') to /dev/rdiff-backup.tmp.7
Processing changed file dev/:5
Regular copying ('dev', ':5') to /dev/rdiff-backup.tmp.8
Processing changed file dev/MAKEDEV
Regular copying ('dev', 'MAKEDEV') to /dev/rdiff-backup.tmp.9
Processing changed file dev/X0R
Regular copying ('dev', 'X0R') to /dev/rdiff-backup.tmp.10
----SNIP----
     .
     .
     .
----SNIP----
Processing changed file dev/pt0
Regular copying ('dev', 'pt0') to /dev/rdiff-backup.tmp.6369
Processing changed file dev/pt1
Regular copying ('dev', 'pt1') to /dev/rdiff-backup.tmp.6370
Processing changed file dev/pt2
Regular copying ('dev', 'pt2') to /dev/rdiff-backup.tmp.6371
Processing changed file dev/pt3
Regular copying ('dev', 'pt3') to /dev/rdiff-backup.tmp.6372
Processing changed file dev/ptmx
Regular copying ('dev', 'ptmx') to /dev/rdiff-backup.tmp.6373
Processing changed file dev/pts
Regular copying ('dev', 'pts') to /dev/rdiff-backup.tmp.6374
Processing changed file dev/ptya0
Removing directory /dev/pts
Sending back exception [Errno 16] Device or resource busy: '/dev/pts' of type exceptions.OSError: File "/usr/lib/python2.2/site-packages/rdiff_backup/connection.py", line 329, in answer_request
    result = apply(eval(request.function_string), argument_list)
File "/usr/lib/python2.2/site-packages/rdiff_backup/restore.py", line 270, in patch
    ITR(diff.index, diff)
File "/usr/lib/python2.2/site-packages/rdiff_backup/rorpiter.py", line 275, in __call__
    if self.finish_branches(index) is None:
File "/usr/lib/python2.2/site-packages/rdiff_backup/rorpiter.py", line 227, in finish_branches
    to_be_finished.end_process()
File "/usr/lib/python2.2/site-packages/rdiff_backup/restore.py", line 633, in end_process
    self.base_rp.rmdir()
File "/usr/lib/python2.2/site-packages/rdiff_backup/rpath.py", line 658, in rmdir
    self.conn.os.rmdir(self.path)

Using mirror root directory /mirror/client/wurzel
Executing ssh -C client rdiff-backup --server
Using mirror root directory /mirror/client/wurzel
Starting restore of /mirror/client/wurzel to / as it was as of Mon Nov 10 10:41:13 2003.
Traceback (most recent call last):
  File "/usr/bin/rdiff-backup", line 24, in ?
    rdiff_backup.Main.Main(sys.argv[1:])
File "/usr/lib/python2.2/site-packages/rdiff_backup/Main.py", line 250, in Main
    take_action(rps)
File "/usr/lib/python2.2/site-packages/rdiff_backup/Main.py", line 224, in take_action
    elif action == "restore-as-of": RestoreAsOf(rps[0], rps[1])
File "/usr/lib/python2.2/site-packages/rdiff_backup/Main.py", line 395, in RestoreAsOf
    restore_common(rpin, target, time)
File "/usr/lib/python2.2/site-packages/rdiff_backup/Main.py", line 407, in restore_common
    restore.Restore(mirror, inc_rpath, target, time)
File "/usr/lib/python2.2/site-packages/rdiff_backup/restore.py", line 50, in Restore
    TargetS.patch(target, diff_iter)
File "/usr/lib/python2.2/site-packages/rdiff_backup/connection.py", line 440, in __call__
    return apply(self.connection.reval, (self.name,) + args)
File "/usr/lib/python2.2/site-packages/rdiff_backup/connection.py", line 362, in reval
    if isinstance(result, Exception): raise result
OSError: [Errno 16] Device or resource busy: '/dev/pts'
Traceback (most recent call last):
  File "/usr/bin/rdiff-backup", line 24, in ?
    rdiff_backup.Main.Main(sys.argv[1:])
File "/usr/lib/python2.2/site-packages/rdiff_backup/Main.py", line 250, in Main
    take_action(rps)
File "/usr/lib/python2.2/site-packages/rdiff_backup/Main.py", line 220, in take_action
    connection.PipeConnection(sys.stdin, sys.stdout).Server()
File "/usr/lib/python2.2/site-packages/rdiff_backup/connection.py", line 347, in Server
    self.get_response(-1)
File "/usr/lib/python2.2/site-packages/rdiff_backup/connection.py", line 309, in get_response
    try: req_num, object = self._get()
File "/usr/lib/python2.2/site-packages/rdiff_backup/connection.py", line 225, in _get
    raise ConnectionReadError("Truncated header string (problem "
rdiff_backup.connection.ConnectionReadError: Truncated header string (problem probably originated remotely)


What's that? I said --exclude-device-files and --exclude /dev and nevertheless it tries to rebuild /dev on client.

Oliver.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]