Author Topic: [SOLVED] Duplicity error Zentyal restoring from backupserver  (Read 3694 times)

lully

  • Zen Apprentice
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
[SOLVED] Duplicity error Zentyal restoring from backupserver
« on: September 10, 2012, 05:28:56 pm »
Hello Zentyal Friends,

i have a Problem with a crashed Zentyal installation. I need to recover it as soon as possible but duplicity doesn´t work as it should!
I have already tested a few solutions and searched alot but it doesn´t work!

The Problem:

The Zentyal System is crashed by a Kernel Panic because of the boot partition.
So i started the recovery process by redefining the partitions and starting to recover the /etc/passwd with duplicity from the backup using grml as a rescue system. Like its described here: http://doc.zentyal.org/en/backup.html

Code: [Select]
duplicity restore --file-to-restore /etc/passwd ftp://server@192.178.78.4/serverbackup /etc/passwd --no-encryption --force
Import of duplicity.backends.sshbackend Failed: No module named parami
NcFTP version is 3.2.5
Password for 'server@192.178.78.4':
Synchronizing remote metadata to local cache...
Copying duplicity-full-signatures.20120820T003135Z.sigtar.gz to local
Traceback (most recent call last):
  File "/usr/bin/duplicity", line 1403, in <module>
    with_tempdir(main)
  File "/usr/bin/duplicity", line 1396, in with_tempdir
    fn()
  File "/usr/bin/duplicity", line 1272, in main
    sync_archive(decrypt)
  File "/usr/bin/duplicity", line 1072, in sync_archive
    copy_to_local(fn)
  File "/usr/bin/duplicity", line 1021, in copy_to_local
    tdp.move(globals.archive_dir.append(loc_name))
  File "/usr/lib/python2.7/dist-packages/duplicity/path.py", line 617,
    self.copy(new_path)
  File "/usr/lib/python2.7/dist-packages/duplicity/path.py", line 425,
    other.writefileobj(self.open("rb"))
  File "/usr/lib/python2.7/dist-packages/duplicity/path.py", line 604,
    fout.write(buf)
IOError: [Errno 28] No space left on device

so i tried out some solutions: with option:
Code: [Select]
--tempdir /mnt/tmp nothing happend

Code: [Select]
mkdir /mnt/tmp
mount --bind /mnt/tmp /tmp
nothing happend

Tried to make this Solution: Brute dirty fix

Tried out all of the solutions on Ubuntu Live System, Knoppix and grml

but on every Platform its the same:

Code: [Select]
IOError: [Errno 28] No space left on device

And
Code: [Select]
df -h
Filesystem      Size  Used Avail Use% Mounted on
/cow            3,8G  3,8G     0 100% /
udev            3,8G  4,0K  3,8G   1% /dev
tmpfs           1,6G  880K  1,6G   1% /run
/dev/sr0        695M  695M     0 100% /cdrom
/dev/loop0      660M  660M     0 100% /rofs
tmpfs           926G   14G  866G   2% /tmp
none            5,0M     0  5,0M   0% /run/lock
none            3,8G   80K  3,8G   1% /run/shm
/dev/sda5       926G   14G  866G   2% /mnt
/dev/sdb2       926G   14G  866G   2% /mnt/home

/tmp rises to 18G and then duplicity crashed!

I don´t Know what to do now...

My suggestions are:
  • Maybe there is a limit for large files in Duplicity
  • Or there is a limit for large files in ftp
  • There is a Bug in duplicity

Can anybody help me ?
« Last Edit: September 13, 2012, 02:25:50 am by lully »

lully

  • Zen Apprentice
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
Update:

I have tested restoring the files on a running new Zentyal Installation and it works.
But i think i cannot overwrite the whole installation of zentyal to restore my old System from backup.
There is nothing to loose i will test it...

Update:
It failed because of some system files...
Now im trying another solution...
i have restored most of the /etc directory to my running zentyal installation.
At next i restore the whole backup to a second partition mounted on /backup/
after this i will boot grml or Ubuntu-Live to restore the etc/passwd and etc/group and then the system by hand with dd. i think this would work for me!

Update:
Another problem might be that i have another HDD configuration after the crash... Is it possible to copy the old system to the new configuration?

Old:
2 HDD 1TB in a Raid0 called dev/md0 mounted on /

new
1 HDD 1 TB called dev/sda2 mounted on /
1 HDD 1 TB called dev/sdb2 mounted on /home

in both configurations i have a 5GB swap partition on both HDD´s

i think i only have to edit the /etc/fstab in order to get the system run right?

Update:
Duplicity is still working on copying the backup to the new backup file!

Top output:
Code: [Select]
  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
 5438 root      20   0  487m 445m 3304 S   12  5.7  46:15.97 duplicity

Code: [Select]
root@Server:/backup# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/md0              913G  1,9G  865G   1% /
none                  3,8G  248K  3,8G   1% /dev
none                  3,8G     0  3,8G   0% /dev/shm
none                  3,8G   88K  3,8G   1% /var/run
none                  3,8G     0  3,8G   0% /var/lock
none                  3,8G     0  3,8G   0% /lib/init/rw
/dev/sdb2             913G  190G  677G  22% /backup #new Backup Folder for later Systemcopy

does anyone think that this solution will work for me?

have anyone any suggestions or idears for me?

greetz lully
« Last Edit: September 12, 2012, 01:48:39 pm by lully »

lully

  • Zen Apprentice
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
UPDATE:

all Files are on there places but the system doesn´t start because of the former Raid System. The Grub bootloader doesn´t find the right partition. I have already reinstalled Grub on the System partition but it doesn´t work because all the UUID´s have changed and the configuration without a raid and other mount points are not compatible to some system files.

now i will go on and try a rescue with: Supergrubdisk

--it failed

I think the grub is totally crashed... I have already reinstalled it:

Code: [Select]
mount /dev/sda2 /mnt
grub-install --root-directory=/mnt /dev/sda

but it doesn´t work... can anyone help me ?

Some System infos:

Contents of /dev/sd*
Code: [Select]
ls /dev/sd*
/dev/sda  /dev/sda1  /dev/sda2  /dev/sdb  /dev/sdb1  /dev/sdb2

Contents of fstab
Code: [Select]
# /etc/fstab: static file system information.
#
# Use 'blkid -o value -s UUID' to print the universally unique identifier
# for a device; this may be used with UUID= as a more robust way to name
# devices that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    nodev,noexec,nosuid 0       0
# / was on /dev/sda2 during installation
#UUID=2c8bc602-d268-4764-a3f8-cd0b03ccd6fc /               ext4    errors=remount-ro,usrquota,grpquota,acl 0$
/dev/sda2                                  /               ext4    errors=remount-ro,usrquota,grpquota,acl 0$
# swap was on /dev/sda1 during installation
UUID=8b2f8125-584e-4af9-91af-ab12980bff55 none            swap    sw              0       0
# swap was on /dev/sdb1 during installation
UUID=c44e2c1d-fca3-4976-8cea-e91f149fda91 none            swap    sw              0       0
# /home on /dev/sdb2 during installation
#UUID=1bccf5b2-11f4-425a-a056-1c7f90d587c8 /home          ext4    errors=remount-ro,usrquota,grpquota,acl 0 $
/dev/sdb2 /home                                           ext4    errors=remount-ro,usrquota,grpquota,acl 0 $


Contents of grub.cfg

Code: [Select]
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by /usr/sbin/grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
  load_env
fi
set default="0"
if [ ${prev_saved_entry} ]; then
  set saved_entry=${prev_saved_entry}
  save_env saved_entry
  set prev_saved_entry=
  save_env prev_saved_entry
  set boot_once=true
fi

function savedefault {
  if [ -z ${boot_once} ]; then
    saved_entry=${chosen}
    save_env saved_entry
  fi
}

function recordfail {
  set recordfail=1
  if [ -n ${have_grubenv} ]; then if [ -z ${boot_once} ]; then save_env recordfail; fi; fi
}
insmod raid
insmod mdraid
insmod ext2
set root='(md0)'
search --no-floppy --fs-uuid --set 9a0ab788-d92e-4923-972f-97a29b57b971
if loadfont /usr/share/grub/unicode.pf2 ; then
  set gfxmode=640x480
  insmod gfxterm
  insmod vbe
  if terminal_output gfxterm ; then true ; else
    # For backward compatibility with versions of terminal.mod that don't
    # understand terminal_output
    terminal gfxterm
  fi
fi
if [ ${recordfail} = 1 ]; then
  set timeout=-1
else
  set timeout=10
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=white/black
set menu_color_highlight=black/light-gray
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
menuentry 'Ubuntu, with Linux 2.6.32-42-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod raid
insmod mdraid
insmod ext2
set root='(md0)'
search --no-floppy --fs-uuid --set 9a0ab788-d92e-4923-972f-97a29b57b971
linux /boot/vmlinuz-2.6.32-42-generic root=/dev/md0 ro   quiet splash
}
menuentry 'Ubuntu, with Linux 2.6.32-42-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod raid
insmod mdraid
insmod ext2
set root='(md0)'
search --no-floppy --fs-uuid --set 9a0ab788-d92e-4923-972f-97a29b57b971
echo 'Loading Linux 2.6.32-42-generic ...'
linux /boot/vmlinuz-2.6.32-42-generic root=/dev/md0 ro single
echo 'Loading initial ramdisk ...'
}
menuentry 'Ubuntu, with Linux 2.6.32-41-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod raid
insmod mdraid
insmod ext2
set root='(md0)'
search --no-floppy --fs-uuid --set 9a0ab788-d92e-4923-972f-97a29b57b971
linux /boot/vmlinuz-2.6.32-41-generic root=UUID=9a0ab788-d92e-4923-972f-97a29b57b971 ro   quiet splash
initrd /boot/initrd.img-2.6.32-41-generic
}
menuentry 'Ubuntu, with Linux 2.6.32-41-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod raid
insmod mdraid
insmod ext2
set root='(md0)'
search --no-floppy --fs-uuid --set 9a0ab788-d92e-4923-972f-97a29b57b971
echo 'Loading Linux 2.6.32-41-generic ...'
linux /boot/vmlinuz-2.6.32-41-generic root=UUID=9a0ab788-d92e-4923-972f-97a29b57b971 ro single
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.32-41-generic
}
menuentry 'Ubuntu, with Linux 2.6.32-40-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod raid
insmod mdraid
insmod ext2
set root='(md0)'
search --no-floppy --fs-uuid --set 9a0ab788-d92e-4923-972f-97a29b57b971
linux /boot/vmlinuz-2.6.32-40-generic root=UUID=9a0ab788-d92e-4923-972f-97a29b57b971 ro   quiet splash
initrd /boot/initrd.img-2.6.32-40-generic
}
menuentry 'Ubuntu, with Linux 2.6.32-40-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod raid
insmod mdraid
insmod ext2
set root='(md0)'
search --no-floppy --fs-uuid --set 9a0ab788-d92e-4923-972f-97a29b57b971
echo 'Loading Linux 2.6.32-40-generic ...'
linux /boot/vmlinuz-2.6.32-40-generic root=UUID=9a0ab788-d92e-4923-972f-97a29b57b971 ro single
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.32-40-generic
}
menuentry 'Ubuntu, with Linux 2.6.32-39-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod raid
insmod mdraid
insmod ext2
set root='(md0)'
search --no-floppy --fs-uuid --set 9a0ab788-d92e-4923-972f-97a29b57b971
linux /boot/vmlinuz-2.6.32-39-generic root=UUID=9a0ab788-d92e-4923-972f-97a29b57b971 ro   quiet splash
initrd /boot/initrd.img-2.6.32-39-generic
}
menuentry 'Ubuntu, with Linux 2.6.32-39-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod raid
insmod mdraid
insmod ext2
set root='(md0)'
search --no-floppy --fs-uuid --set 9a0ab788-d92e-4923-972f-97a29b57b971
echo 'Loading Linux 2.6.32-39-generic ...'
linux /boot/vmlinuz-2.6.32-39-generic root=UUID=9a0ab788-d92e-4923-972f-97a29b57b971 ro single
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.32-39-generic
}
menuentry 'Ubuntu, with Linux 2.6.32-38-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod raid
insmod mdraid
insmod ext2
set root='(md0)'
search --no-floppy --fs-uuid --set 9a0ab788-d92e-4923-972f-97a29b57b971
linux /boot/vmlinuz-2.6.32-38-generic root=UUID=9a0ab788-d92e-4923-972f-97a29b57b971 ro   quiet splash
initrd /boot/initrd.img-2.6.32-38-generic
}
menuentry 'Ubuntu, with Linux 2.6.32-38-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod raid
insmod mdraid
insmod ext2
set root='(md0)'
search --no-floppy --fs-uuid --set 9a0ab788-d92e-4923-972f-97a29b57b971
echo 'Loading Linux 2.6.32-38-generic ...'
linux /boot/vmlinuz-2.6.32-38-generic root=UUID=9a0ab788-d92e-4923-972f-97a29b57b971 ro single
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.32-38-generic
}
menuentry 'Ubuntu, with Linux 2.6.32-33-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod raid
insmod mdraid
insmod ext2
set root='(md0)'
search --no-floppy --fs-uuid --set 9a0ab788-d92e-4923-972f-97a29b57b971
linux /boot/vmlinuz-2.6.32-33-generic root=UUID=9a0ab788-d92e-4923-972f-97a29b57b971 ro   quiet splash
initrd /boot/initrd.img-2.6.32-33-generic
}
menuentry 'Ubuntu, with Linux 2.6.32-33-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod raid
insmod mdraid
insmod ext2
set root='(md0)'
search --no-floppy --fs-uuid --set 9a0ab788-d92e-4923-972f-97a29b57b971
echo 'Loading Linux 2.6.32-33-generic ...'
linux /boot/vmlinuz-2.6.32-33-generic root=UUID=9a0ab788-d92e-4923-972f-97a29b57b971 ro single
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.32-33-generic
}
menuentry 'Ubuntu, with Linux 2.6.32-24-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod raid
insmod mdraid
insmod ext2
set root='(md0)'
search --no-floppy --fs-uuid --set 9a0ab788-d92e-4923-972f-97a29b57b971
linux /boot/vmlinuz-2.6.32-24-generic root=UUID=9a0ab788-d92e-4923-972f-97a29b57b971 ro   quiet splash
initrd /boot/initrd.img-2.6.32-24-generic
}
menuentry 'Ubuntu, with Linux 2.6.32-24-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod raid
insmod mdraid
insmod ext2
set root='(md0)'
search --no-floppy --fs-uuid --set 9a0ab788-d92e-4923-972f-97a29b57b971
echo 'Loading Linux 2.6.32-24-generic ...'
linux /boot/vmlinuz-2.6.32-24-generic root=UUID=9a0ab788-d92e-4923-972f-97a29b57b971 ro single
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.32-24-generic
}
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
insmod raid
insmod mdraid
insmod ext2
set root='(md0)'
search --no-floppy --fs-uuid --set 9a0ab788-d92e-4923-972f-97a29b57b971
linux16 /boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
insmod raid
insmod mdraid
insmod ext2
set root='(md0)'
search --no-floppy --fs-uuid --set 9a0ab788-d92e-4923-972f-97a29b57b971
linux16 /boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
if [ ${timeout} != -1 ]; then
  if keystatus; then
    if keystatus --shift; then
      set timeout=-1
    else
      set timeout=0
    fi
  else
    if sleep --interruptible 3 ; then
      set timeout=0
    fi
  fi
fi
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###
I think there are a lot of bad entrys in the grub.cfg

has anyone an idear for reconfigure the whole startup thing with all connected files and grub and /etc/fstab ?

greez lully
« Last Edit: September 12, 2012, 02:59:23 pm by lully »

lully

  • Zen Apprentice
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
nothing ?  :-[


... :'(

Ok next try:

at next i will install zentyal on the system like my plan above (sda2 / sdb2 /home) without formatting /home (where the backup is placed) then i try to copy the old system from the backup to sda2 without /boot and /etc/fstab!

maybe it works! ?  ???
« Last Edit: September 12, 2012, 03:39:53 pm by lully »

lully

  • Zen Apprentice
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
Solution: (only for Zentyal 2.0 or earlyer)

Solution!