moving the pool disk to another computer -- file ownership
Rob Owens <rowens <at> ptd.net>
2016-04-25 20:28:50 GMT
I had an issue with the root filesystem of my backuppc server (system A) which
required a restore. So I moved the pool disk to another computer (system B),
installed backuppc on that computer, booted system A off of a live CD, and
prepared for a restore.
However, system B assigned a different UID to the backuppc user than system A
did, so all of the files in the backuppc pool (now attached to system B) did
not have the proper ownership. As a result, backuppc would not start. I got
the "test hardlink failed" message.
I considered changing the UID of the backuppc user (using the usermod command)
but the UID I needed to change it to was already in use. So I did
'chown -R backuppc.backuppc /var/lib/backuppc'. This took several hours, as
there were 59 million files (mostly hard links). But it worked and I got my
restore done. (Note: I also chown'd my /etc/BackupPC files).
So I'm trying to figure out the best way to avoid this in the future. Here
are some ideas I had. I'm looking for critiques and advice.
1) Choose a UID that hopefully won't be used on any future system I may
install backuppc onto. Maybe something in the 300-399 range. usermod my
backuppc user on all systems to use that UID, and chown my pool today while
I'm not in a hurry.
2) Try to convince Craig Barratt and all major distros to standardize on
a particular UID and GID for the backuppc user and group. This is harder
for me to accomplish than #1, but would virtually guarantee that my pool
disk could be dropped into any other server, regardless of distro.
3) Run backuppc as root in an emergency. I actually tried this, but the
web interface complained that it was not being run as the same user that
owned the pool files. And apache refused to run as root, so I was unable
to make this work.
4) Temporarily usermod my backuppc user to whatever UID is required to get
things to work during an emergency, even if it does conflict with another
user account. Usermod has the '--non-unique' option which would allow this.
What negative consequences might this have?
5) Convince backuppc to disregard the "test hardlink failed", and start
anyway. I suspect I would still run into file permission problems, though.
By the way, both systems in question are running Funtoo. But my goal
would be to make this work on any system. In a disaster situation, I
may need to install whatever distro I have easy access to, or even use a
live cd or live usb.
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
BackupPC-users mailing list
BackupPC-users <at> lists.sourceforge.net