Operating System - HP-UX
1833730 Members
2469 Online
110063 Solutions
New Discussion

copy of /var/mqm/logs directory to /var/mqm/logs FS

 
Becke
Super Advisor

copy of /var/mqm/logs directory to /var/mqm/logs FS


Hi Guys,

I have a filesystem called /var/mqm, and there is a sub directory in this filesystem called logs.

Now i have created a separate filesystem called /var/mqm/logs and I need to move all the data to this newly created filesystem called /var/mqm/logs from /var/mqm/log directory.

What steps are involved. What I think is to backup /var/mqm/logs to tsm server and leave the newly created /var/mqm/logs filesystem unmounted, and then remove the old logs directiry from /var/mqm filesystem.

And then mount the new filesystem /var/mqm/logs and use tsm server to restore /var/mqm/logs, would this work???

Please let me know the steps or if the above is ok...its urgent guys
2 REPLIES 2
James R. Ferguson
Acclaimed Contributor

Re: copy of /var/mqm/logs directory to /var/mqm/logs FS

Hi Raf:

You intermixed a singlular "log" with a plural "logs" at one point, so a couple of scenarios exist.

You can do:

# cd /var/mqm/log && find . â depth â print | cpio â pudlmv /var/mqm/logs

This will copy everything (recursively) within '/var/mqm/log' [note the *singular* "log"] to '/var/mqm/logs [note the *plural* 'logs"].

If this is *not* the nomenclature you want, and you are trying to create a mountpoint for '/var/mqm/logs' that is discrete from the '/var' mountpoint, simply edit '/etc/fstab' to add 'var/mqm/logs' as a mountpoint of its own and do:

# mount all

Regards!

...JRF...
James R. Ferguson
Acclaimed Contributor

Re: copy of /var/mqm/logs directory to /var/mqm/logs FS

Hi (again) Raf:

I mangled my own post, above.

You intermixed a singlular "log" with a plural "logs" at one point, so a couple of scenarios exist.

You can do:

# cd /var/mqm/log && find . -depth -print | cpio -pudlmv /var/mqm/logs

...will copy everything (recursively) within '/var/mqm/log' [note the *singular* "log"] to '/var/mqm/logs [note the *plural* 'logs"].

If you want to retain '/var/mqm/logs' [*plural*] as the name of the new mountpoint and this is the same as the old directory, simply mount the *new* filesystem using a temporary name; perform the copy as above; verify the results are as intended; remove the *old* directory ('/var/mqm/logs'); rename (using 'mv') the temporary directory to be '/var/mqm/logs'; edit '/etc/fstab' to match this; and mount the renamed directory.

Regards!

...JRF...