From: Ishan P. <a-i...@gl...> - 2008-07-11 09:22:26
|
Hi friends .. Thanks in advance to all of you guys... I am new to BackupPC .. and i have done a lot of try and error for successfully haveing my data back .. BUT I AM NOTABLE TO RESTORE MY DATA THROUGH WEB INTERFACE When i select files and click on restore then it says that "Reply from server was: ok: requested restore of localhost" but my files are not restored .. and i got the following error in my log file... 2008-07-11 14:25:41 restore started below directory /backbpo 2008-07-11 14:25:46 restore failed (BackupPC_tarCreate failed) .... "Reply from server was: ok: requested restore of localhost" so any idea why its happening ? i would like to provide u people some out puts and some of my configuration .. here we go.... ---->>>uname -a root@ishan:~# uname -a Linux ishan 2.6.24-16-generic #1 SMP Thu Apr 10 13:23:42 UTC 2008 i686 GNU/Linux ---->>>i m using Ubuntu 8.04- the Hardy Heron - released in April 2008. ---->>>this is my /etc/sudoers file's entry # User privilege specification root ALL=(ALL) ALL backuppc ALL=NOPASSWD: /bin/tar ---->>>/etc/passwd has following entry.... backuppc:x:1003:1003::/home/backuppc:/bin/bash ---->>> i have done ssh without root passwd configuration by generation public/private key for my localhost i.e i am able to ssh to my own pc with root passwd proof... backuppc@ishan:/root$ ssh -l root 192.168.0.96 whoami root backuppc@ishan:/root$ here i dont even prompt for passwd ..so this is also done .... ---->>> i have my configuration in /etc/backuppc directory backuppc@ishan:~$ cd /etc/backuppc/ backuppc@ishan:/etc/backuppc$ ls -l total 100 -rw-r--r-- 1 backuppc root 414 2007-10-25 01:54 apache.conf -rw-r--r-- 1 backuppc root 77591 2007-10-25 01:54 config.pl -rw-r--r-- 1 backuppc root 2238 2007-10-25 01:54 hosts -rw-r--r-- 1 backuppc root 0 2008-07-10 15:03 htgroup -rw-r--r-- 1 backuppc root 23 2008-07-10 15:03 htpasswd -rw-r----- 1 backuppc www-data 448 2008-07-11 11:23 localhost.pl -rw-r----- 1 backuppc www-data 450 2008-07-11 10:26 localhost.pl.old -rw-r----- 1 backuppc www-data 0 2008-07-10 15:26 LOCK backuppc@ishan:/etc/backuppc$ ---->>> my localhost.pl file backuppc@ishan:/etc/backuppc$ cat localhost.pl # # Local server backup of /etc as user backuppc # $Conf{XferMethod} = 'tar'; $Conf{TarShareName} = [ '/backbpo' ]; $Conf{TarClientCmd} = '/usr/bin/env LC_ALL=C $tarPath -c -v -f - -C $shareName --totals'; # remove extra shell escapes ($fileList+ etc.) that are # needed for remote backups but may break local ones $Conf{TarFullArgs} = '$fileList'; $Conf{TarIncrArgs} = '--newer=$incrDate $fileList'; $Conf{RsyncShareName} = [ '/backbpo' ]; backuppc@ishan:/etc/backuppc$ ---->>> this is my directory whose backup i m taking its /backbpo #ls -l /backbpo drwxrwxrwx 3 backuppc backuppc 4096 2008-07-11 12:44 backbpo #cd /backbpo ls -l -rwxrwxrwx 1 backuppc backuppc 0 2008-07-10 15:24 3 -rwxrwxrwx 1 backuppc backuppc 0 2008-07-10 15:24 4 -rwxrwxrwx 1 backuppc backuppc 0 2008-07-10 15:24 5 -rwxrwxrwx 1 backuppc backuppc 0 2008-07-10 15:24 6 drwxrwxrwx 2 backuppc backuppc 4096 2008-07-10 18:27 test AND this is what my backup is root@ishan:/var/lib/backuppc/pc/localhost/3# ls -l total 12 -rw-r----- 2 backuppc backuppc 24 2008-07-11 13:31 attrib -rw-r----- 1 backuppc backuppc 516 2008-07-11 13:31 backupInfo drwxr-x--- 3 backuppc backuppc 4096 2008-07-11 13:31 f%2fbackbpo i have also tried to give 777 permissions to f%2fbackbpo firectory .. then also no help.. ----->> this is my disk usage .. root@ishan:/var/lib/backuppc/pc/localhost/3# df -h Filesystem Size Used Avail Use% Mounted on /dev/sda3 20G 2.9G 16G 16% / varrun 474M 116K 474M 1% /var/run varlock 474M 0 474M 0% /var/lock udev 474M 56K 474M 1% /dev devshm 474M 12K 474M 1% /dev/shm lrm 474M 38M 437M 8% /lib/modules/2.6.24-16-generic/volatile /dev/sda1 487M 29M 433M 7% /boot /dev/sda2 19G 9.1G 8.4G 52% /data /dev/sda5 15G 407M 14G 3% /var ------>> this is my hosts file root@ishan:/var/lib/backuppc/pc/localhost/3# cat /etc/hosts 127.0.0.1 localhost 127.0.1.1 ishan.com ishan 192.168.0.96 ishan.com ishan # The following lines are desirable for IPv6 capable hosts ::1 ip6-localhost ip6-loopback fe00::0 ip6-localnet ff00::0 ip6-mcastprefix ff02::1 ip6-allnodes ff02::2 ip6-allrouters ff02::3 ip6-allhosts ................................... i am getting my restore fail everytime .. 2008-07-11 14:46:13 restore started below directory /backbpo 2008-07-11 14:46:17 restore failed (BackupPC_tarCreate failed) ------------->>> last i have also tried to do something nesty with command line but i m getting this error in that also .. root@ishan:/var/lib/backuppc/pc/localhost/3# /usr/share/backuppc/bin/BackupPC_zcat /var/lib/backuppc/pc/localhost/2/f%2fbackbpo/f2 /usr/share/backuppc/bin/BackupPC_zcat: can't open /var/lib/backuppc/pc/localhost/2/f%2fbackbpo/f2 SSSOOOOO please help me out from this ... and do tell me if u want some other information... Regards Ishan |
From: dan <dan...@gm...> - 2008-07-11 13:57:48
|
I have the same issue when restoring large amounts of data, so I just use the command line interface. I typically backup to DVD so I pull a tar.gz off and split it out into 100MB chunks, and then par2 it at 25% and drop those on DVD. On Fri, Jul 11, 2008 at 3:22 AM, Ishan Patel <a-i...@gl...> wrote: > Hi friends .. > > Thanks in advance to all of you guys... > > I am new to BackupPC .. and i have done a lot of try and error for > successfully haveing my data back .. > > BUT I AM NOTABLE TO RESTORE MY DATA THROUGH WEB INTERFACE > > When i select files and click on restore then it says that > > "Reply from server was: ok: requested restore of localhost" > > but my files are not restored .. and i got the following error in my log > file... > > 2008-07-11 14:25:41 restore started below directory /backbpo > 2008-07-11 14:25:46 restore failed (BackupPC_tarCreate failed) > > .... > > "Reply from server was: ok: requested restore of localhost" > > so any idea why its happening ? > > i would like to provide u people some out puts and some of my configuration > .. > > > here we go.... > > ---->>>uname -a > > root@ishan:~# uname -a > Linux ishan 2.6.24-16-generic #1 SMP Thu Apr 10 13:23:42 UTC 2008 i686 > GNU/Linux > > ---->>>i m using Ubuntu 8.04- the Hardy Heron - released in April 2008. > > ---->>>this is my /etc/sudoers file's entry > > # User privilege specification > root ALL=(ALL) ALL > backuppc ALL=NOPASSWD: /bin/tar > > ---->>>/etc/passwd has following entry.... > > backuppc:x:1003:1003::/home/backuppc:/bin/bash > > ---->>> i have done ssh without root passwd configuration by generation > public/private key for my localhost > > i.e i am able to ssh to my own pc with root passwd > > proof... > > backuppc@ishan:/root$ ssh -l root 192.168.0.96 whoami > root > backuppc@ishan:/root$ > > here i dont even prompt for passwd ..so this is also done .... > > ---->>> > > i have my configuration in /etc/backuppc directory > > backuppc@ishan:~$ cd /etc/backuppc/ > backuppc@ishan:/etc/backuppc$ ls -l > total 100 > -rw-r--r-- 1 backuppc root 414 2007-10-25 01:54 apache.conf > -rw-r--r-- 1 backuppc root 77591 2007-10-25 01:54 config.pl > -rw-r--r-- 1 backuppc root 2238 2007-10-25 01:54 hosts > -rw-r--r-- 1 backuppc root 0 2008-07-10 15:03 htgroup > -rw-r--r-- 1 backuppc root 23 2008-07-10 15:03 htpasswd > -rw-r----- 1 backuppc www-data 448 2008-07-11 11:23 localhost.pl > -rw-r----- 1 backuppc www-data 450 2008-07-11 10:26 localhost.pl.old > -rw-r----- 1 backuppc www-data 0 2008-07-10 15:26 LOCK > backuppc@ishan:/etc/backuppc$ > > > > ---->>> my localhost.pl file > > backuppc@ishan:/etc/backuppc$ cat localhost.pl > # > # Local server backup of /etc as user backuppc > # > $Conf{XferMethod} = 'tar'; > > $Conf{TarShareName} = [ > '/backbpo' > ]; > > $Conf{TarClientCmd} = '/usr/bin/env LC_ALL=C $tarPath -c -v -f - -C > $shareName --totals'; > > # remove extra shell escapes ($fileList+ etc.) that are > # needed for remote backups but may break local ones > $Conf{TarFullArgs} = '$fileList'; > $Conf{TarIncrArgs} = '--newer=$incrDate $fileList'; > $Conf{RsyncShareName} = [ > '/backbpo' > ]; > backuppc@ishan:/etc/backuppc$ > > > ---->>> > this is my directory whose backup i m taking > > its /backbpo > > #ls -l /backbpo > > drwxrwxrwx 3 backuppc backuppc 4096 2008-07-11 12:44 backbpo > > #cd /backbpo > > ls -l > > -rwxrwxrwx 1 backuppc backuppc 0 2008-07-10 15:24 3 > -rwxrwxrwx 1 backuppc backuppc 0 2008-07-10 15:24 4 > -rwxrwxrwx 1 backuppc backuppc 0 2008-07-10 15:24 5 > -rwxrwxrwx 1 backuppc backuppc 0 2008-07-10 15:24 6 > drwxrwxrwx 2 backuppc backuppc 4096 2008-07-10 18:27 test > > AND this is what my backup is > > root@ishan:/var/lib/backuppc/pc/localhost/3# ls -l > total 12 > -rw-r----- 2 backuppc backuppc 24 2008-07-11 13:31 attrib > -rw-r----- 1 backuppc backuppc 516 2008-07-11 13:31 backupInfo > drwxr-x--- 3 backuppc backuppc 4096 2008-07-11 13:31 f%2fbackbpo > > i have also tried to give 777 permissions to f%2fbackbpo firectory .. then > also no help.. > > ----->> > > this is my disk usage .. > > root@ishan:/var/lib/backuppc/pc/localhost/3# df -h > Filesystem Size Used Avail Use% Mounted on > /dev/sda3 20G 2.9G 16G 16% / > varrun 474M 116K 474M 1% /var/run > varlock 474M 0 474M 0% /var/lock > udev 474M 56K 474M 1% /dev > devshm 474M 12K 474M 1% /dev/shm > lrm 474M 38M 437M 8% > /lib/modules/2.6.24-16-generic/volatile > /dev/sda1 487M 29M 433M 7% /boot > /dev/sda2 19G 9.1G 8.4G 52% /data > /dev/sda5 15G 407M 14G 3% /var > > > ------>> > > this is my hosts file > > root@ishan:/var/lib/backuppc/pc/localhost/3# cat /etc/hosts > 127.0.0.1 localhost > 127.0.1.1 ishan.com ishan > 192.168.0.96 ishan.com ishan > # The following lines are desirable for IPv6 capable hosts > ::1 ip6-localhost ip6-loopback > fe00::0 ip6-localnet > ff00::0 ip6-mcastprefix > ff02::1 ip6-allnodes > ff02::2 ip6-allrouters > ff02::3 ip6-allhosts > > > ................................... > > i am getting my restore fail everytime .. > > 2008-07-11 14:46:13 restore started below directory /backbpo > 2008-07-11 14:46:17 restore failed (BackupPC_tarCreate failed) > > > > ------------->>> > > last i have also tried to do something nesty with command line but i m > getting this error in that also .. > > root@ishan:/var/lib/backuppc/pc/localhost/3# > /usr/share/backuppc/bin/BackupPC_zcat > /var/lib/backuppc/pc/localhost/2/f%2fbackbpo/f2 > /usr/share/backuppc/bin/BackupPC_zcat: can't open > /var/lib/backuppc/pc/localhost/2/f%2fbackbpo/f2 > > > > > > > SSSOOOOO please help me out from this ... > > > and do tell me if u want some other information... > > > Regards > Ishan > > > > > > > ------------------------------------------------------------------------- > Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! > Studies have shown that voting for your favorite open source project, > along with a healthy diet, reduces your potential for chronic lameness > and boredom. Vote Now at http://www.sourceforge.net/community/cca08 > _______________________________________________ > BackupPC-users mailing list > Bac...@li... > List: https://lists.sourceforge.net/lists/listinfo/backuppc-users > Wiki: http://backuppc.wiki.sourceforge.net > Project: http://backuppc.sourceforge.net/ > > |
From: Craig B. <cba...@us...> - 2008-07-11 21:46:04
|
Ishan writes: > When i select files and click on restore then it says that > > "Reply from server was: ok: requested restore of localhost" > > but my files are not restored .. and i got the following error in my log file... Look in the RestoreLOG file to see exactly what command is being run and what the error is. Craig |
From: Holger P. <wb...@pa...> - 2008-07-12 21:31:33
|
Hi, On Fri, Jul 11, 2008 at 02:52:31PM +0530, Ishan Patel wrote: > [...] > BUT I AM NOTABLE TO RESTORE MY DATA THROUGH WEB INTERFACE first of all, thank you for providing detailed information on your setup. Unfortunately, the problem seems to be somewhat obscure, so I agree with Craig that we need some more information from your log files. I don't agree with Dan, backuppc-users' most notorious top-poster, that he didn't manage to set up restores, so you shouldn't bother either ... We can try to clear up some misconceptions though. > ---->>>this is my /etc/sudoers file's entry > > # User privilege specification > root ALL=(ALL) ALL > backuppc ALL=NOPASSWD: /bin/tar That would allow backups and restores through sudo/tar, if BackupPC was configured to do so (which it is not). > ---->>> i have done ssh without root passwd configuration by generation > public/private key for my localhost > > i.e i am able to ssh to my own pc with root passwd > > proof... > > backuppc@ishan:/root$ ssh -l root 192.168.0.96 whoami > root > backuppc@ishan:/root$ That is mostly fine - except that for 'localhost' the command would be ssh -l root localhost which may ask you to accept the public key of 'localhost' even if the key has already been accepted for 192.168.0.96. Presuming that also works without prompt, it would allow backups and restores via ssh, if BackupPC was configured to do so (which it is also not). Additionally, I would like to point out that using both 'sudo' and 'ssh -l root' for the same backup is pointless. One or the other will do, combining both makes no sense. It makes sense however to ssh to a *remote* host (which you want to backup) as a *non privileged user* and then use 'sudo' to gain root privileges for a 'tar' or 'rsync' command, because in this way, you can limit root privileges to the command invocations needed (you can even allow backups ('tar -c') but disallow restores ('tar -x')). For a local backup, 'sudo' is preferable over 'ssh', because it saves you the unnecessary overhead of encryption and the TCP/IP stack (well, and because you can limit it to 'tar'/'rsync'). > ---->>> my localhost.pl file > > backuppc@ishan:/etc/backuppc$ cat localhost.pl > # > # Local server backup of /etc as user backuppc > # > $Conf{XferMethod} = 'tar'; > > $Conf{TarShareName} = [ > '/backbpo' > ]; > > $Conf{TarClientCmd} = '/usr/bin/env LC_ALL=C $tarPath -c -v -f - -C > $shareName --totals'; This means you are using *neither sudo nor ssh* for backups. You're simply running 'tar' locally. This will limit your backups to files readable by the 'backuppc' user. That's ok for a test scenario, but it won't get you far later on. Since you've setup 'sudo', you could change that to $Conf{TarClientCmd} = '/usr/bin/env LC_ALL=C sudo $tarPath -c -v -f -' . ' -C $shareName --totals'; > # remove extra shell escapes ($fileList+ etc.) that are > # needed for remote backups but may break local ones > $Conf{TarFullArgs} = '$fileList'; > $Conf{TarIncrArgs} = '--newer=$incrDate $fileList'; The default value of TarClientRestoreCmd (which you don't seem to be overriding) seems to be $Conf{TarClientRestoreCmd} = '$sshPath -q -x -l root $host env LC_ALL=C' . ' $tarPath ...'; # and so on i.e. tar over ssh. You'd probably want to change that to $Conf{TarClientRestoreCmd} = /usr/bin/env LC_ALL=C sudo $tarPath -x -p' . ' --numeric-owner --same-owner -v -f -' . ' -C $shareName'; (Disclaimer: I'm not sure if LC_ALL=C will survive 'sudo' or be filtered out of the environment; take it as a gesture of good will.) > $Conf{RsyncShareName} = [ > '/backbpo' > ]; You don't need that one for XferMethod = tar. > ---->>> > this is my directory whose backup i m taking > > its /backbpo > > #ls -l /backbpo > > drwxrwxrwx 3 backuppc backuppc 4096 2008-07-11 12:44 backbpo > > #cd /backbpo > > ls -l > > -rwxrwxrwx 1 backuppc backuppc 0 2008-07-10 15:24 3 > -rwxrwxrwx 1 backuppc backuppc 0 2008-07-10 15:24 4 > -rwxrwxrwx 1 backuppc backuppc 0 2008-07-10 15:24 5 > -rwxrwxrwx 1 backuppc backuppc 0 2008-07-10 15:24 6 > drwxrwxrwx 2 backuppc backuppc 4096 2008-07-10 18:27 test There's not much in those files ... note that there seems to be no file named '2'. > AND this is what my backup is > > root@ishan:/var/lib/backuppc/pc/localhost/3# ls -l > total 12 > -rw-r----- 2 backuppc backuppc 24 2008-07-11 13:31 attrib > -rw-r----- 1 backuppc backuppc 516 2008-07-11 13:31 backupInfo > drwxr-x--- 3 backuppc backuppc 4096 2008-07-11 13:31 f%2fbackbpo There's probably also a backup number 2 ... > i have also tried to give 777 permissions to f%2fbackbpo firectory .. then > also no help.. You shouldn't do that, and it's definitely not necessary for the backuppc user to access the files. When you're doing real backups, you definitely don't want everyone to have full read - let alone write - access on all files in the backup. As a side note, if you *only* change the f%2fbackbpo directory and not the parent directories, your change will have no effect in any case, because access to a file requires access to the path elements above it. /var/lib/backuppc and all directories below it should not have any access for 'others' (i.e. 0xx0 permissions, aka. 'o='). > ------------->>> > > last i have also tried to do something nesty with command line but i m > getting this error in that also .. > > root@ishan:/var/lib/backuppc/pc/localhost/3# > /usr/share/backuppc/bin/BackupPC_zcat > /var/lib/backuppc/pc/localhost/2/f%2fbackbpo/f2 > /usr/share/backuppc/bin/BackupPC_zcat: can't open > /var/lib/backuppc/pc/localhost/2/f%2fbackbpo/f2 What if you change the 2s to 3s? As far as I remember, zero length files are a special case. They should be restored correctly, but I don't know if BackupPC_zcat handles them. Try putting some content into your files, doing a backup and then retry BackupPC_zcat. > and do tell me if u want some other information... On Fri, Jul 11, 2008 at 02:46:04PM -0700, Craig Barratt wrote: > [...] > Look in the RestoreLOG file to see exactly what command is being > run and what the error is. We need to know more about why BackupPC_tarCreate failed. I wouldn't normally expect it to fail, even if the restore process lacks the privileges to restore the files in question. Regards, Holger |