Discussion:
[BackupPC-devel] BackupPC 4.0.0beta3 rsync_bpc "No such file or directory (2)"
Mertz, Jean
2014-03-04 14:39:06 UTC
Permalink
I’ve been setting up a fresh BackupPC instance for our company’s servers.
While we have other backup strategies, we like BackupPC for some vital
(config) files that might change over time, so we can easily track and
revert changes (as opposed to using something like Git in each directory).

We have had an older version of BackupPC running, but removed it a while
back and just recently started setting up a v4 instance. Everything is set
up and running (manually), but BackupPC still won’t start a proper backup.

For testing, we actually let BackupPC ssh into its own machine to backup
“itself”. This doesn’t work however.

Here is the command we used (generated by all the different configuration
variables, ip-address redacted):

/usr/local/bin/rsync_bpc --bpc-top-dir /mnt/backuppc/backups
--bpc-host-name <ip-address> --bpc-share-name / --bpc-bkup-num 0
--bpc-bkup-comp 3 --bpc-bkup-prevnum -1 --bpc-bkup-prevcomp -1
--bpc-bkup-inode0 1 --bpc-log-level 2 -e '/usr/bin/ssh -o
UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i
/var/lib/backuppc/.ssh/id_rsa -l backupper' --rsync-path="sudo
/usr/bin/rsync" --super --recursive --protect-args --numeric-ids
--perms --owner --group -D --times --links --hard-links --delete
--partial --log-format="log: %o %i %B %8U,%8G %9l %f%L" --stats
--checksum --exclude=/tmp --exclude=/proc --exclude=/sys
--exclude=*.pem --exclude=id_rsa --exclude=.bash_history
--exclude=/var/logs --exclude=/usr/src --exclude=/opt/chef
<ip-address>:/ /

And here is the output we get in the XferLOG:

Contents of file /mnt/backuppc/backups/pc/<ip-address>/XferLOG.bad.z,
modified 2014-03-04 13:38:39

XferLOG file /mnt/backuppc/backups/pc/<ip-address>/XferLOG.0.z created
2014-03-04 13:38:32
Backup prep: type = full, case = 1, inPlace = 1, doDuplicate = 0,
newBkupNum = 0, newBkupIdx = 0, lastBkupNum = , lastBkupIdx =
(FillCycle = 7, noFillCnt = )
Running: /usr/local/bin/rsync_bpc --bpc-top-dir /mnt/backuppc/backups
--bpc-host-name <ip-address> --bpc-share-name / --bpc-bkup-num 0
--bpc-bkup-comp 3 --bpc-bkup-prevnum -1 --bpc-bkup-prevcomp -1
--bpc-bkup-inode0 1 --bpc-log-level 2 -e '/usr/bin/ssh -o
UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i
/var/lib/backuppc/.ssh/id_rsa -l backupper' --rsync-path="sudo
/usr/bin/rsync" --super --recursive --protect-args --numeric-ids
--perms --owner --group -D --times --links --hard-links --delete
--partial --log-format="log: %o %i %B %8U,%8G %9l %f%L" --stats
--checksum --exclude=/tmp --exclude=/proc --exclude=/sys
--exclude=*.pem --exclude=id_rsa --exclude=.bash_history
--exclude=/var/logs --exclude=/usr/src --exclude=/opt/chef
<ip-address>:/ /
full backup started for directory /
Xfer PIDs are now 30878
This is the rsync child about to exec /usr/local/bin/rsync_bpc
rsync_bpc: Failed to exec /usr/bin/ssh -o
UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i
/var/lib/backuppc/.ssh/id_rsa -l backupper: No such file or directory
(2)
Done: 0 errors, 0 filesExist, 0 sizeExist, 0 sizeExistComp, 0
filesTotal, 0 sizeTotal, 0 filesNew, 0 sizeNew, 0 sizeNewComp, 1 inode
rsync error: error in IPC code (code 14) at pipe.c(84) [Receiver=3.0.9.3]
rsync_bpc: connection unexpectedly closed (0 bytes received so far) [Receiver]
Done: 0 errors, 0 filesExist, 0 sizeExist, 0 sizeExistComp, 0
filesTotal, 0 sizeTotal, 0 filesNew, 0 sizeNew, 0 sizeNewComp, 1 inode
rsync error: error in rsync protocol data stream (code 12) at
io.c(629) [Receiver=3.0.9.3]
rsync_bpc exited with fatal status 12 (3072) (rsync error: error in
rsync protocol data stream (code 12) at io.c(629) [Receiver=3.0.9.3])
Xfer PIDs are now
Got fatal error during xfer (DumpPostUserCmd returned error status 3072)
Backup aborted (DumpPostUserCmd returned error status 3072)
BackupFailCleanup: nFilesTotal = 0, type = full, BackupCase = 1,
inPlace = 1, lastBkupNum =
Removing empty backup #0
BackupPC_backupDelete: removing #0
BackupPC_backupDelete: No prior backup for merge
BackupPC_backupDelete: got 0 errors
Running BackupPC_refCountUpdate -h <ip-address> -f on <ip-address>
xferPids 30885
BackupPC_refCountUpdate: host <ip-address> got 0 errors
BackupPC_refCountPrint: total errors: 0
xferPids
Finished BackupPC_refCountUpdate (running time: 1 sec)

However, if we run the command manually (from the backuppc user) it starts
successfully (ie. files are being transferred from the client).

Also, what’s weird is that the error log states the
DumpPostUserCmdreturned an error, while all pre- and post actions are
undef at the moment (see backuppc02 screenshot, they are also not defined
"globally").

Here are some screenshots of the client’s configuration:

Loading Image...

Loading Image...

Any thoughts on what could be causing this?
Holger Parplies
2014-03-04 23:25:21 UTC
Permalink
b***@kosowsky.org
2014-03-04 23:44:31 UTC
Permalink
Post by unknown
Hi,
[user configuration error question deleted]
Any thoughts on what could be causing this?
yes. On the correct list, I'd even share them.
Perhaps you are being a bit harsh. BackupPC 4.0 is still alpha so
perhaps the OP could be forgiven for using the devel list even for
what may turn out to be more of a config question.
Mertz, Jean
2014-03-05 13:15:22 UTC
Permalink
So, from Holger's response I guess I said something that I wasn't supposed
to say? I posted this in "devel" because it might be a bug in alpha3, and I
also noticed another post in devel regarding an issue with alpha3, that's
why I thought this would be the best location to ask.

My question still stands, and I hope someone can help me out, if it's not a
bug I will ask the same in the"user" list, I just figured you might be
interested in this report due to the fact that 4 is still heavily in
development.

Thank you for helping out.
Post by b***@kosowsky.org
Hi,
Mertz, Jean wrote on 2014-03-04 15:39:06 +0100 [[BackupPC-devel]
[user configuration error question deleted]
Any thoughts on what could be causing this?
yes. On the correct list, I'd even share them.
Perhaps you are being a bit harsh. BackupPC 4.0 is still alpha so
perhaps the OP could be forgiven for using the devel list even for
what may turn out to be more of a config question.
Mertz, Jean
2014-03-06 14:02:29 UTC
Permalink
So,

I managed to track down the issue. It *was* a configuration issue after
all. Given that my rsync -e arguments contained spaces (ie. ssh -i
/var/lib/backuppc/.ssh/id_rsa.pub -l backupper) I thought I had to properly
quote the arguments to make sure it was working correctly.

In the output this command seemed correct:

Running: /usr/local/bin/rsync_bpc --bpc-top-dir /mnt/backuppc/backups
--bpc-host-name <ip-address> --bpc-share-name / --bpc-bkup-num 0
--bpc-bkup-comp 3 --bpc-bkup-prevnum -1 --bpc-bkup-prevcomp -1
--bpc-bkup-inode0 1 --bpc-log-level 2 -e '/usr/bin/ssh -o
UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i
/var/lib/backuppc/.ssh/id_rsa -l backupper' --rsync-path="sudo
/usr/bin/rsync" --super --recursive --protect-args --numeric-ids
--perms --owner --group -D --times --links --hard-links --delete
--partial --log-format="log: %o %i %B %8U,%8G %9l %f%L" --stats
--checksum --exclude=/tmp --exclude=/proc --exclude=/sys
--exclude=*.pem --exclude=id_rsa --exclude=.bash_history
--exclude=/var/logs --exclude=/usr/src --exclude=/opt/chef
<ip-address>:/ /

while in fact, it was using the following switch internally:

-e '/usr/bin/ssh\ \ -o\ UserKnownHostsFile=/dev/null\ -o\
StrictHostKeyChecking=no\ -i\ /var/lib/backuppc/.ssh/id_rsa\ -l\
backupper'

This obviously doesn’t work (escaping spaces + using quotes). This is also
the reason why c/p’ing the command as being logged and running it manually
*did* work, since the escaping wasn’t being shown in the log and thus
didn’t happen in my manual attempts.

So in conclusion:

1) BackupPC properly escapes spaces in arguments, so no need to put them in
quotes
2) BackupPC doesn’t log these escapes, so if you *did* put the arguments in
quotes, you won’t notice this unless you manually run ./bin/BackupPC_dump
-f -v <client-ip>

Now, one more thing I had to do was set UserCmdCheckStatus to 0, because
otherwise it would still exit, saying the pre-command returned -1, even
though it is set to undef in the configuration file.

On Wed, Mar 5, 2014 at 2:51 PM, Tyler J. Wagner <***@tolaris.com> wrote:

No, your question was in line. Holger is ... not friendly.
Hopefully someone will be able to help. Good luck.
Regards,
Tyler
Post by Mertz, Jean
So, from Holger's response I guess I said something that I wasn't
supposed
Post by Mertz, Jean
to say? I posted this in "devel" because it might be a bug in alpha3,
and I
Post by Mertz, Jean
also noticed another post in devel regarding an issue with alpha3, that's
why I thought this would be the best location to ask.
My question still stands, and I hope someone can help me out, if it's
not a
Post by Mertz, Jean
bug I will ask the same in the"user" list, I just figured you might be
interested in this report due to the fact that 4 is still heavily in
development.
Thank you for helping out.
Holger Parplies wrote at about 00:25:21 +0100 on Wednesday, March 5,
Hi,
Mertz, Jean wrote on 2014-03-04 15:39:06 +0100 [[BackupPC-devel]
[user configuration error question deleted]
Any thoughts on what could be causing this?
yes. On the correct list, I'd even share them.
Perhaps you are being a bit harsh. BackupPC 4.0 is still alpha so
perhaps the OP could be forgiven for using the devel list even for
what may turn out to be more of a config question.
------------------------------------------------------------------------------
Post by Mertz, Jean
Subversion Kills Productivity. Get off Subversion & Make the Move to
Perforce.
Post by Mertz, Jean
With Perforce, you get hassle-free workflows. Merge that actually works.
Faster operations. Version large binaries. Built-in WAN optimization
and the
Post by Mertz, Jean
freedom to use Git, Perforce or both. Make the move to Perforce.
http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg.clktrk
Post by Mertz, Jean
_______________________________________________
BackupPC-devel mailing list
List: https://lists.sourceforge.net/lists/listinfo/backuppc-devel
Wiki: http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/
--
"Quis custodiet ipsos custodes?" [Who watches the watchers?]
-- Juvenal's "Satires"
unknown
1970-01-01 00:00:00 UTC
Permalink
Hi,
[user configuration error question deleted]
Any thoughts on what could be causing this?
yes. On the correct list, I'd even share them.

Regards,
Holger
Loading...