Operating System - HP-UX
1830938 Members
1817 Online
110017 Solutions
New Discussion

Re: how to restore the file system?

 
SOLVED
Go to solution
Rambo_1
Regular Advisor

how to restore the file system?

Hi,
I have a lv named /dev/vg00/sybase, size=3.5GB, mount point is /sybase.I want to remove it ,re-create it and restore all of the data or files to the file system /sybase. how to do it ?
Thanks !

8 REPLIES 8
RAC_1
Honored Contributor

Re: how to restore the file system?

Many ways to do it.

If you have space somewhere on system itself,
then

cd /sybase
find . | cpio -pxlmd /path_where_you_have_enuogh_space.
lvremove /dev/vgxx/lvolx ->sybase lvol
recreate it - lvcreate
mount it.
copy back old data.
cd /path_where_you_have_copied_data
find . | cpio -pxlmd /sybase
There is no substitute to HARDWORK
Rambo_1
Regular Advisor

Re: how to restore the file system?

Hi RAC,
But I don't familiar with cpio command, could you give another way .

Thanks again!
Arunvijai_4
Honored Contributor

Re: how to restore the file system?

Hi Rambo,

If you are familiar with "tar", you can use it as well.

# tar -cvf to create and # tar -xvf to extract.

_Arun
"A ship in the harbor is safe, but that is not what ships are built for"
Khashru
Valued Contributor

Re: how to restore the file system?

Hi,

if you have tape drive then you can do a fbackup also.
Rambo_1
Regular Advisor

Re: how to restore the file system?

How to use the fbackup and frecover?I have a DDS3 tape .
Arunvijai_4
Honored Contributor

Re: how to restore the file system?

Hi,

Do a "man fbackup and frecover". You will get to know how to do it. Also, check this docs,

http://docs.hp.com/en/B2355-90950/ch06s05.html
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=877253

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
Khashru
Valued Contributor
Solution

Re: how to restore the file system?

fbackup -v -f /dev/rmt/0mn -i /sybase
frecover -xv -i /sybase -f /dev/rmt/0mn
Frank de Vries
Respected Contributor

Re: how to restore the file system?

I would use tar

Make an empty directory with at least
as much space as is on /sybase
and then transfer with tar immdiately
through a pipe , an carbon copy

Assume you have directory /backup then
the command is:

go to /sybase
cd /sybase
tar cd - . | (cd /backup; tar xvf - )

This will also inlucde 0 byte files, links
everything, thus an exact copy and you
can check the block sizes afterwards to
compare. No need to use intermediate tar files

Just the dogs bollocks !!
Look before you leap