BackupPC-users

Re: [BackupPC-users] localhost Can't cd to /root: Permission denied

2016-07-20 09:15:52
Subject: Re: [BackupPC-users] localhost Can't cd to /root: Permission denied
From: Adam Goryachev <mailinglists AT websitemanagers.com DOT au>
To: backuppc-users AT lists.sourceforge DOT net
Date: Wed, 20 Jul 2016 23:15:14 +1000



On 20/07/2016 21:51, Robert Wooden wrote:
First, sorry about the top posting.

Here is the errorlog:

Contents of file /var/lib/backuppc/pc/localhost/XferLOG.bad.z, modified 2016-07-17 07:53:14 (Extracting only Errors)

Running:  ${Conf}{TarClientCmd} = ‘/usr/bin/sudo /bin/tar -c -v -f - -C /’ . ‘ -–totals’; --exclude=./proc --exclude=./dev --exclude=./tmp --exclude=./mnt --exclude=./media --exclude=./var/lib --exclude=./sys --exclude=./var/cache --exclude=./usr/src --exclude=./var/lock --exclude=./var/tmp --exclude=./lost+found --exclude=./var/spool --exclude=./var/run --exclude=./var/games --exclude=./home/*/.Trash --exclude=./home/*/.mozilla/*/*/Cache --exclude=./home/*/.mozilla/*/*/Cache.Trash .
full backup started for directory /
Xfer PIDs are now 2173,2172
Wide character in print at /usr/share/backuppc/lib/BackupPC/Lib.pm line 1330.
This seems to be where the problems start, so I suspect it. Most commonly these type of problems are caused by using a locale other than C, so the first thing I would try is to change the OS default locale to C, and then try it again.

Exec failed for  ${Conf}{TarClientCmd} = ‘/usr/bin/sudo /bin/tar -c -v -f - -C /’ . ‘ -–totals’; --exclude=./proc --exclude=./dev --exclude=./tmp --exclude=./mnt --exclude=./media --exclude=./var/lib --exclude=./sys --exclude=./var/cache --exclude=./usr/src --exclude=./var/lock --exclude=./var/tmp --exclude=./lost+found --exclude=./var/spool --exclude=./var/run --exclude=./var/games --exclude=./home/*/.Trash --exclude=./home/*/.mozilla/*/*/Cache --exclude=./home/*/.mozilla/*/*/Cache.Trash .
tarExtract: Done: 0 errors, 0 filesExist, 0 sizeExist, 0 sizeExistComp, 0 filesTotal, 0 sizeTotal
Got fatal error during xfer (No files dumped for share /)
Backup aborted (No files dumped for share /)
Not saving this as a partial backup since it has fewer files than the prior one (got 0 and 0 files versus 0)

Here is the verbose output of my test command:

CheckHostAlive: returning 0.025
Wide character in print at /usr/share/backuppc/lib/BackupPC/FileZIO.pm line 302.
Here it is again, so looks like it affected the ping command as well as the tar command above...
Running:  ${Conf}{TarClientCmd} = ‘sudo /bin/tar -c -v -f - -C /’ . ‘ –totals’; --exclude=./proc --exclude=./dev --exclude=./tmp --exclude=./mnt --exclude=./media --exclude=./var/lib --exclude=./sys --exclude=./var/cache --exclude=./usr/src --exclude=./var/lock --exclude=./var/tmp --exclude=./lost+found --exclude=./var/spool --exclude=./var/run --exclude=./var/games --exclude=./home/*/.Trash --exclude=./home/*/.mozilla/*/*/Cache --exclude=./home/*/.mozilla/*/*/Cache.Trash .
full backup started for directory /
started full dump, share=/
Xfer PIDs are now 29915,29914
xferPids 29915,29914
cmdExecOrEval: about to exec Wide character in print at /usr/share/backuppc/lib/BackupPC/Lib.pm line 1323.
\$\{Conf\}\{TarClientCmd\} = ‘sudo /bin/tar -c -v -f - -C /’ . ‘ –totals’\; --exclude=./proc --exclude=./dev --exclude=./tmp --exclude=./mnt --exclude=./media --exclude=./var/lib --exclude=./sys --exclude=./var/cache --exclude=./usr/src --exclude=./var/lock --exclude=./var/tmp --exclude=./lost+found --exclude=./var/spool --exclude=./var/run --exclude=./var/games --exclude=./home/\*/.Trash --exclude=./home/\*/.mozilla/\*/\*/Cache --exclude=./home/\*/.mozilla/\*/\*/Cache.Trash .
Wide character in print at /usr/share/backuppc/lib/BackupPC/Lib.pm line 1330.
Exec failed for  ${Conf}{TarClientCmd} = ‘sudo /bin/tar -c -v -f - -C /’ . ‘ –totals’; --exclude=./proc --exclude=./dev --exclude=./tmp --exclude=./mnt --exclude=./media --exclude=./var/lib --exclude=./sys --exclude=./var/cache --exclude=./usr/src --exclude=./var/lock --exclude=./var/tmp --exclude=./lost+found --exclude=./var/spool --exclude=./var/run --exclude=./var/games --exclude=./home/*/.Trash --exclude=./home/*/.mozilla/*/*/Cache --exclude=./home/*/.mozilla/*/*/Cache.Trash .
tarExtract: Done: 0 errors, 0 filesExist, 0 sizeExist, 0 sizeExistComp, 0 filesTotal, 0 sizeTotal
Got fatal error during xfer (No files dumped for share /)
cmdSystemOrEval: about to system /bin/ping6 -c 1 localhost
cmdSystemOrEval: finished: got output PING localhost(localhost) 56 data bytes
64 bytes from localhost: icmp_seq=1 ttl=64 time=0.039 ms

--- localhost ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.039/0.039/0.039/0.000 ms

cmdSystemOrEval: about to system /bin/ping6 -c 1 localhost
cmdSystemOrEval: finished: got output PING localhost(localhost) 56 data bytes
64 bytes from localhost: icmp_seq=1 ttl=64 time=0.026 ms

--- localhost ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.026/0.026/0.026/0.000 ms

CheckHostAlive: returning 0.026
Backup aborted (No files dumped for share /)
Can't cd to /root: Permission denied

This almost looks like it is an error message generated on the local side, AFTER the backup attempt has completed. What is the current working directory when you ran the above test? Some other commands encoded into your shell prompt or similar?
Could it be selinux blocking something?

The apparmor and selinux are two programs I see many different tutorials being disabled for various reasons, that is why I suggest these as possibilities.

I don't know enough about apparmor or selinux, but I'd suggest trying to disable them as per the online suggestions, and then see if it fails the same. You can always re-enable these features once you have solved the problem

As everyone can see I am using tar for my localhost backup . . . but that doesn't mean I am not open to suggestions.

Personally, I'd use rsync over SSH, but there is no reason tar should not work....
And finally, sorry about the "scratching my head" humor.

No problem, I was trying to add some also, but I guess my jokes online are as bad as my jokes in person.....

Let us know how you go, please remember to include config, logs and actual output of commands run wherever possible, it makes it easier for more people to help.

PS, don't apologise for top-posting, either don't top post, and make the time/effort to post properly, or just top-post anyway and recognise that some people who might be able to assist will not because it is too difficult/time consuming to try, or just because top posting really annoys them. There is no point in saying you are sorry for something, and then purposefully doing it anyway.

Regards,
Adam

------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports.http://sdm.link/zohodev2dev
_______________________________________________
BackupPC-users mailing list
BackupPC-users AT lists.sourceforge DOT net
List:    https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:    http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/