Re: Troubles with moving /var

1999-12-28 Thread John Pearson
On Mon, Dec 20, 1999 at 09:58:51PM -0500, Brian Servis wrote
 *- On 20 Dec, Ethan Benson wrote about Re: Troubles with moving /var
  On 20/12/99 aphro wrote:
  
 
 cp -a doesn't work on more obscure platforms like irix..there is a tar
 command..that acts like cp -a i saw it posted in a magazine(Maximum
 Linux) but i forgot what it was, if its linux its safe to use cp -a
  
  probably something like (cd / ; tar -cvpf - var) | (cd /home ; tar -xvpf -)
  
  quite a bit more obnoxious then cp -a for sure, but iirc it seemed to 
  deal with symlinks a bit better.  there is a cpio way too but i'll 
  leave that to someone else.
  
  the key is when using tar use the -p switch !!  :-)
  
  
 
 cd /var; find . -mount | cpio -dumpv /home/var
 
 has done the trick for me several times.
 

I use
# cd /source/dir/ ; find . -xdev | afio -p /dest/dir/

afio is the only one (of tar, afio and cpio) that has successfully
done everything asked of it.  

Any of the following may not get copied correctly with one or another 
version of the other two:
 special files (block  character devices)
 sockets  named pipes
 sparse files
 long pathnames
 symlinks
 hard links

I'm sure it's not perfect, but it hasn't failed me yet.


John P.
-- 
[EMAIL PROTECTED]
[EMAIL PROTECTED]
Oh - I - you know - my job is to fear everything. - Bill Gates in Denmark


Re: Troubles with moving /var

1999-12-21 Thread Ethan Benson

On 20/12/99 aphro wrote:



cp -a doesn't work on more obscure platforms like irix..there is a tar
command..that acts like cp -a i saw it posted in a magazine(Maximum
Linux) but i forgot what it was, if its linux its safe to use cp -a


probably something like (cd / ; tar -cvpf - var) | (cd /home ; tar -xvpf -)

quite a bit more obnoxious then cp -a for sure, but iirc it seemed to 
deal with symlinks a bit better.  there is a cpio way too but i'll 
leave that to someone else.


the key is when using tar use the -p switch !!  :-)


--
Ethan Benson
To obtain my PGP key: http://www.alaska.net/~erbenson/pgp/


Re: Troubles with moving /var

1999-12-21 Thread Brian Servis
*- On 20 Dec, Ethan Benson wrote about Re: Troubles with moving /var
 On 20/12/99 aphro wrote:
 

cp -a doesn't work on more obscure platforms like irix..there is a tar
command..that acts like cp -a i saw it posted in a magazine(Maximum
Linux) but i forgot what it was, if its linux its safe to use cp -a
 
 probably something like (cd / ; tar -cvpf - var) | (cd /home ; tar -xvpf -)
 
 quite a bit more obnoxious then cp -a for sure, but iirc it seemed to 
 deal with symlinks a bit better.  there is a cpio way too but i'll 
 leave that to someone else.
 
 the key is when using tar use the -p switch !!  :-)
 
 

cd /var; find . -mount | cpio -dumpv /home/var

has done the trick for me several times.

-- 
Brian Servis
-- 

Mechanical Engineering  |  Never criticize anybody until you  
Purdue University   |  have walked a mile in their shoes,
[EMAIL PROTECTED]   |  because by that time you will be a
http://www.ecn.purdue.edu/~servis   |  mile away and have their shoes.


Re: Troubles with moving /var

1999-12-21 Thread Paolo Pedaletti
Ciao Alberto Bigazzi,

  I actually did it by hand, by tar-ing /var, copying it under /home and
  untaring it there. Then deleting /var and symlinking /home/var to /var.
   
  But I guess this is something VERY BAD as I ended up with lots of problems
  with PERMISSIONS. Now normal users CANNOT write into directories under
  /var,  like /var/log or /var/lock, so I get lots of troubles of any
  kind...

I have done the same things, with the same errors... :-)
I think that the problems are all that daemons that don't want to recognize
the changes.

shutdown now

should fix all (or stop  restart all daemons).

Ciao

-- 

Paolo Pedaletti, Como, ITALYa
paolo . pedaletti @ flashnet . it


Troubles with moving /var

1999-12-20 Thread Alberto Bigazzi

The  / partition on my home PC is fairly small and sometimes gets filled 
up because ov /var, so I've  decided to  migrate /var somewhere else. 

I have /usr and /home as separate partitions and would like to leave /usr
alone, thus putting /var under /home, which is quite large and nearly
unused (it's just a home PC, and use it to connect to the 'real' one at
work). 

Q: Which is the correct way to do this? 
===

I actually did it by hand, by tar-ing /var, copying it under /home and
untaring it there. Then deleting /var and symlinking /home/var to /var.
 
But I guess this is something VERY BAD as I ended up with lots of problems
with PERMISSIONS. Now normal users CANNOT write into directories under
/var,  like /var/log or /var/lock, so I get lots of troubles of any
kind...

Alberto. 




Re: Troubles with moving /var

1999-12-20 Thread Ethan Benson

On 20/12/99 Alberto Bigazzi wrote:


I actually did it by hand, by tar-ing /var, copying it under /home and
untaring it there. Then deleting /var and symlinking /home/var to /var.

But I guess this is something VERY BAD as I ended up with lots of problems
with PERMISSIONS. Now normal users CANNOT write into directories under
/var,  like /var/log or /var/lock, so I get lots of troubles of any
kind...


sounds like you forgot the -p switch to tar, which preserves the 
permissions, without it everything gets set according to your 
(probably root's) umask, if you have already nuked the real /var then 
your in for a bunch of chmoding i suppose..  I am not sure the best 
way to find out what the permissions are supposed to be other then 
have someone send you a recursive ls -l of their /var hierarchy.  I 
am not aware of any quick way to restore the permissions to the 
proper values other then manually at this point, perhaps someone else 
has some ideas?


just a couple i can tell you now, /var/lock is mode 1777, /var/log is 
mode 755 (users should not be able to write there), /var/spool/mail 
is mode 2775  those are the most important `special' directories i 
can think of right now, but there are several daemons with special 
directories under /var that have different owners/modes to allow them 
to run non-root.


always mv the old directory out of the way and test your change 
before rm -rfing it ! :-)



--
Ethan Benson
To obtain my PGP key: http://www.alaska.net/~erbenson/pgp/


Re: Troubles with moving /var

1999-12-20 Thread aphro
i moved /var /home /usr with the command cp -a which preserves everything,
i did it on 2 main servers and have nbot had a single problem so i bet its
a safe way of doing it(the servers have been online since april)

cp -a doesn't work on more obscure platforms like irix..there is a tar
command..that acts like cp -a i saw it posted in a magazine(Maximum
Linux) but i forgot what it was, if its linux its safe to use cp -a

nate

On Mon, 20 Dec 1999, Alberto Bigazzi wrote:

albbig 
albbig The  / partition on my home PC is fairly small and sometimes gets 
filled 
albbig up because ov /var, so I've  decided to  migrate /var somewhere else. 
albbig 
albbig I have /usr and /home as separate partitions and would like to leave 
/usr
albbig alone, thus putting /var under /home, which is quite large and nearly
albbig unused (it's just a home PC, and use it to connect to the 'real' one at
albbig work). 
albbig 
albbig Q: Which is the correct way to do this? 
albbig ===
albbig 
albbig I actually did it by hand, by tar-ing /var, copying it under /home and
albbig untaring it there. Then deleting /var and symlinking /home/var to /var.
albbig  
albbig But I guess this is something VERY BAD as I ended up with lots of 
problems
albbig with PERMISSIONS. Now normal users CANNOT write into directories under
albbig /var,  like /var/log or /var/lock, so I get lots of troubles of any
albbig kind...
albbig 
albbig Alberto. 
albbig 
albbig 
albbig 
albbig 
albbig -- 
albbig Unsubscribe?  mail -s unsubscribe [EMAIL PROTECTED]  /dev/null
albbig 

[mailto:[EMAIL PROTECTED] ]--
   Vice President Network Operations   http://www.firetrail.com/
  Firetrail Internet Services Limited  http://www.aphroland.org/
   Everett, WA 425-348-7336http://www.linuxpowered.net/
Powered By:http://comedy.aphroland.org/
Debian 2.1 Linux 2.0.36 SMPhttp://yahoo.aphroland.org/
-[mailto:[EMAIL PROTECTED] ]--
7:23am up 122 days, 19:13, 2 users, load average: 0.42, 0.33, 0.30