View previous topic :: View next topic |
Author |
Message |
rlittle Apprentice
Joined: 17 Dec 2003 Posts: 200
|
Posted: Sat Jan 27, 2007 8:24 pm Post subject: |
|
|
After reading your article and the entire info page for "tar", I have to agree that I did blindly blurt out "tar it over and everything will work!"
What I should have said was: be careful, and be sure of what you are trying to do, AND have a backup in case you bork everything, then AS SUPER-USER tar it over and everything will work!"
Have to agree, making a backup that you might restore with a different copy of tar on a different OS is a far trickier thing that tarring over a partition. But on one system, tarring to a different partition on the same system (as root)... I'm sure even / and /dev will be fine. Permissions will definitely be fine. Making it bootable is, of course, a different task. In my case, I'm not moving /, I'm just relocating /usr, /opt, and /home, so I admit, I didn't think twice.
I just migrated 25TB of systems over the past 3 months, and I've forgotten that everybody doesn't spend their day as "root". _________________ I need a better signature... |
|
Back to top |
|
|
halfgaar l33t
Joined: 22 Feb 2004 Posts: 781 Location: Netherlands
|
Posted: Sat Jan 27, 2007 8:42 pm Post subject: |
|
|
Quote: | Permissions will definitely be fine. |
No, they won't. Tar subtracts the current umask without the -p option.
Quote: | In my case, I'm not moving /, I'm just relocating /usr, /opt, and /home |
When you have hard links that span between /usr and /lib, you're going to have a problem with this. I don't know if they exist, but I do know that I wouldn't feel comfortable spreading my system out over different partitions like that. _________________ Linux backups the right way.
Get surround sound working. |
|
Back to top |
|
|
F-0_ICE l33t
Joined: 06 Dec 2004 Posts: 679
|
Posted: Sat Jan 27, 2007 9:06 pm Post subject: |
|
|
yawn....i just finished the microsoft winblows re-install and i am again reminded why i hate winblows: reboot! reboot! reboot! reboot! over and over. the only things i ever need to reboot for in gentoo are a kernel rebuild or baselayout upgrade.
anyway thanks for everyones help. i will mark this thread solved sooner or later so use it to continue your discussion if you want.
sleepy sleepy sleepy......... _________________ ~AMD64
AMD: Athlon64 X2 3800+
2G PC3200
ATI: RADEON HD 4350
Linksys: WMP54G
True Knowledge is Best Acquired Through Experience. |
|
Back to top |
|
|
halfgaar l33t
Joined: 22 Feb 2004 Posts: 781 Location: Netherlands
|
Posted: Sat Jan 27, 2007 9:36 pm Post subject: |
|
|
Quote: | yawn....i just finished the microsoft winblows re-install and i am again reminded why i hate winblows: reboot! reboot! reboot! reboot! over and over. the only things i ever need to reboot for in gentoo are a kernel rebuild or baselayout upgrade. |
Well, you asked for advice a few posts back. I could give you some late advice: don't use windows _________________ Linux backups the right way.
Get surround sound working. |
|
Back to top |
|
|
F-0_ICE l33t
Joined: 06 Dec 2004 Posts: 679
|
Posted: Sat Jan 27, 2007 10:13 pm Post subject: |
|
|
halfgaar wrote: | Well, you asked for advice a few posts back. I could give you some late advice: don't use windows |
actually i hardly ever use it at all. the only time i use it is for itunes and my ipod and if i somehow get gentoo fubar. which is really hard to do by accident. which is why i decided to switch drives since that nice SATA drive wasn't really doing anything i thought I'd put it to better use with gentoo _________________ ~AMD64
AMD: Athlon64 X2 3800+
2G PC3200
ATI: RADEON HD 4350
Linksys: WMP54G
True Knowledge is Best Acquired Through Experience.
Last edited by F-0_ICE on Sat Jan 27, 2007 11:44 pm; edited 2 times in total |
|
Back to top |
|
|
rlittle Apprentice
Joined: 17 Dec 2003 Posts: 200
|
Posted: Sat Jan 27, 2007 11:05 pm Post subject: |
|
|
Just for trivia:
Code: | # umask
0022
# umask -S
u=rwx,g=rx,o=rx
|
Whether the permissions are 0400 (-r--------) or 0777 (-rwxrwxrwx) the permissions are unchanged by "tar" (when run as root). Try it yourself.
Not trying to start a flamewar here. The info file is sometimes vauge on what tar does by default, and doesn't point out that it behaves differently when run by root.
Mind you, I did get these errors which I wasn't expecting:
Code: | tar: ./rlittle/.bittorrent/data/ui_socket: socket ignored
tar: ./rlittle/.gnome-system-monitor.rlittle: socket ignored
tar: ./rlittle/.gtk-gnutella/ipc/socket: socket ignored
tar: ./rlittle/.sound-juicer.rlittle: socket ignored |
...so I'll find out the hard way if I get bitten or not.
Thanks, _________________ I need a better signature... |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54317 Location: 56N 3W
|
Posted: Sat Jan 27, 2007 11:08 pm Post subject: |
|
|
rlittle,
Your two copies of tar filling and emptying a pipe works fine. I've used it several times. Permisions are indeed preserved
How can you usefully tar a socket ? _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
rlittle Apprentice
Joined: 17 Dec 2003 Posts: 200
|
Posted: Sat Jan 27, 2007 11:24 pm Post subject: |
|
|
I don't know. Just showing I don't know everything. There could be something ELSE I didn't expect too.
Everything is moved. System is running. _________________ I need a better signature... |
|
Back to top |
|
|
halfgaar l33t
Joined: 22 Feb 2004 Posts: 781 Location: Netherlands
|
Posted: Sat Jan 27, 2007 11:27 pm Post subject: |
|
|
When I test it now, it indeed preserves permissions and ownerships. I can distinctly remember that it didn't last time I tested it. And, I can also distinctly remember destroying a system because I forgot the -p option. I of course know I have to be root, that's not the issue. I wonder what's the deal. Perhaps they changed the default in some new version.
In any case, I'm not gonna rely on defaults...
And about the sockets; perhaps it skips them because sockets are usually created by apps at runtime? It's just a guess. I can't get it to create sockets either. Dar, rsync and "cp -a" do do it. _________________ Linux backups the right way.
Get surround sound working. |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54317 Location: 56N 3W
|
Posted: Sat Jan 27, 2007 11:50 pm Post subject: |
|
|
halfgaar,
tar preserves everything when working with a pipe but not with a real file.
Try missing the -p option next time you untar a stage 3 tarball. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
halfgaar l33t
Joined: 22 Feb 2004 Posts: 781 Location: Netherlands
|
Posted: Sat Jan 27, 2007 11:59 pm Post subject: |
|
|
I tried it by running tar cvfz and then xvfz.... Still, when using either, I'd rather specify --preserve-permissions and --numeric-owner manually. _________________ Linux backups the right way.
Get surround sound working. |
|
Back to top |
|
|
|