SearchFAQMemberlist Log in
Reply to topic Page 1 of 1
file ownership after restore
Author Message
Post file ownership after restore 
i suspect this is just a user-error issue, but i'd like to know
how to do this properly.

i had a disk die yesterday, and was ever so pleased to be running
such a great backup program, that i was able to install a
replacement, create the filesystem, and start the tar pipe to do
the restore:

bin/BackupPC_tarCreate -h firethorn -n 259 -s /var2 / |
ssh -l root firethorn tar -C /var2 -xvf -

this worked just fine, and all of my files appeared on firethorn
just fine.

however, it looks as if at some point in the backup/restore
process that uid/gid information is being treated as names,
rather than numerically, because i had files change ownership
after the restore. specifically, files owned by the user
"remadm" (uid 500 on firethorn, the target of the backup and
restore) were restored as user "alias" instead. user alias is
uid 500 on the backuppc host, and is uid 21 on firethorn -- the
files were owned by uid 21 after restoral.

it looks as if the ownership info went from firethorn to the
backuppc host numerically during the backup, and then back the
other way by name during the restore. is there a way to run the
above tarpipe differently to avoid this issue? if uids were
handled numerically at all times, i'm sure this wouldn't have
happened. i'm running tar 1.13.25 on both machines, and i'm
running backuppc 2.0.2.

i was able to repair this manually fairly easily, and didn't find
any other examples, so it wasn't a big deal, but i'd like to
avoid it for the Big One, if you know what i mean. Smile

paul
=---------------------
paul fox, pgf < at > foxharp.boston.ma.us (arlington, ma, where it's 66.7 degrees)


-------------------------------------------------------
This SF.Net email is sponsored by OSTG. Have you noticed the changes on
Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
one more big change to announce. We are now OSTG- Open Source Technology
Group. Come see the changes on the new OSTG site. www.ostg.com
_______________________________________________
BackupPC-users mailing list
BackupPC-users < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/backuppc-users
http://backuppc.sourceforge.net/

Post file ownership after restore 
Paul Fox writes:

i suspect this is just a user-error issue, but i'd like to know
how to do this properly.

i had a disk die yesterday, and was ever so pleased to be running
such a great backup program, that i was able to install a
replacement, create the filesystem, and start the tar pipe to do
the restore:

bin/BackupPC_tarCreate -h firethorn -n 259 -s /var2 / |
ssh -l root firethorn tar -C /var2 -xvf -

this worked just fine, and all of my files appeared on firethorn
just fine.

however, it looks as if at some point in the backup/restore
process that uid/gid information is being treated as names,
rather than numerically, because i had files change ownership
after the restore. specifically, files owned by the user
"remadm" (uid 500 on firethorn, the target of the backup and
restore) were restored as user "alias" instead. user alias is
uid 500 on the backuppc host, and is uid 21 on firethorn -- the
files were owned by uid 21 after restoral.

it looks as if the ownership info went from firethorn to the
backuppc host numerically during the backup, and then back the
other way by name during the restore. is there a way to run the
above tarpipe differently to avoid this issue? if uids were
handled numerically at all times, i'm sure this wouldn't have
happened. i'm running tar 1.13.25 on both machines, and i'm
running backuppc 2.0.2.

By default tar uses the user and group names in the tar archive instead
of the numeric values. BackupPC fills both in. The numeric uid/gid
will always match what was backed up, but the mapping from uid->uname
is based on the server, not the client, as you discovered.

You should specify the --numeric-owner option to the tar x:

bin/BackupPC_tarCreate -h firethorn -n 259 -s /var2 / |
ssh -l root firethorn tar -C /var2 --numeric-owner -xvf -

See $Conf{TarClientRestoreCmd}.

Craig


-------------------------------------------------------
This SF.Net email is sponsored by OSTG. Have you noticed the changes on
Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
one more big change to announce. We are now OSTG- Open Source Technology
Group. Come see the changes on the new OSTG site. www.ostg.com
_______________________________________________
BackupPC-users mailing list
BackupPC-users < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/backuppc-users
http://backuppc.sourceforge.net/

Post file ownership after restore 
it looks as if the ownership info went from firethorn to the
backuppc host numerically during the backup, and then back the
other way by name during the restore. is there a way to run the
above tarpipe differently to avoid this issue? if uids were
...

You should specify the --numeric-owner option to the tar x:

bin/BackupPC_tarCreate -h firethorn -n 259 -s /var2 / |
ssh -l root firethorn tar -C /var2 --numeric-owner -xvf -

thanks very much -- this option doesn't seem to have made it into
the tar man page, though it's in the usage, and certainly seems
to work. thanks!

paul
=---------------------
paul fox, pgf < at > foxharp.boston.ma.us (arlington, ma, where it's 72.9 degrees)


-------------------------------------------------------
This SF.Net email is sponsored by OSTG. Have you noticed the changes on
Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
one more big change to announce. We are now OSTG- Open Source Technology
Group. Come see the changes on the new OSTG site. www.ostg.com
_______________________________________________
BackupPC-users mailing list
BackupPC-users < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/backuppc-users
http://backuppc.sourceforge.net/

Display posts from previous:
Reply to topic Page 1 of 1
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
  


Magic SEO URL for phpBB