1834958 Members
1798 Online
110071 Solutions
New Discussion

Re: Fbackup and restore

 
juno2
Super Advisor

Fbackup and restore

I use fbackup to backup the files , and use sam to restore files , but the subdirectories can't be restore eg.

fbackup:
/home/usera/abc
/home/userb/def
/home/userc/ghi

but only the following files are restored ,
/home/usera
/home/userb
/home/userc

the files abc , def , ghi are disappeared , how can i restore it ? thx
13 REPLIES 13
Michael Tully
Honored Contributor

Re: Fbackup and restore

First let's check what is on the tape:

# frecover -I /tmp/index -f /dev/rmt/?m

If they are, then create a simple text file

# vi /tmp/graph
insert like this

i /home/usera/abc
i /home/userb/def
i /home/userc/ghi

Save the file
Running this should recover the files.

# frecover -xg /tmp/graph -f /dev/rmt/?m

Change the ?m to your corresponding device.
Anyone for a Mutiny ?
Zigor Buruaga
Esteemed Contributor

Re: Fbackup and restore

Hi,

Maybe a wrong syntax while adding components to be restored in SAM?
I can't remember now, but try with lines like
"/home/usera/" or
"/home/usera/*.*"

Also check if the files are really backup up.
Hope this helps.
Regards,
Zigor
malay boy
Trusted Contributor

Re: Fbackup and restore

Hi,
Check whether the subdirectories exist in the tape using :
frecover -f -I /tmp/index

do a grep on /tmp/index , e.g:

grep /home/usera/abc /tmp/index

if exist next do the frecover with inclusion and if not exist,do another backup.

is the subdirectories abc , def are NFS...

if nfs you need to -n for fbackup.

regards
mB
There are three person in my team-Me ,myself and I.
juno2
Super Advisor

Re: Fbackup and restore

I have checked that the files are exist.
Michael Tully
Honored Contributor

Re: Fbackup and restore

If the files exust on the tape, then there is no reason why you can't restore them from the commands I've given you.
Anyone for a Mutiny ?
juno2
Super Advisor

Re: Fbackup and restore

thx TG,

I think the sam function can't restore the files on the sub-directory ( only files under /home but not usera , userb , userc ) , you method is good , but I have over 200 files under usera , how to restore all the files (including the subdirectories) under /home ? thx
juno2
Super Advisor

Re: Fbackup and restore

not TG's method , It should be Michael Tully's method .
Michael Tully
Honored Contributor

Re: Fbackup and restore

If you create the 'graph' file as suggested but using only the diretory name it will restore the whole directory and everything underneath it. Do not use wildcards.

e.g. graph file
i /home/usera

Will restore all files and subdirectories underneath it.

# frecover -xg /tmp/graph -f /dev/rmt/?m
Anyone for a Mutiny ?
Con O'Kelly
Honored Contributor

Re: Fbackup and restore

Hi

The following command should restore everything under /home to its orginal location.

# frecover -x -v -f -i /home


Cheers
Con
Zigor Buruaga
Esteemed Contributor

Re: Fbackup and restore

Hi,

I have just tested with SAM, and it works fine.
I have added "/home/" directory to be restored and all its files and subdirectories has been restored.

Regards,
Zigor
Elena Leontieva
Esteemed Contributor

Re: Fbackup and restore

Think you should use overwrite -o option, like:

frecover -x -o -i /home/usera -f /dev/rmt/...

Elena.
juno2
Super Advisor

Re: Fbackup and restore

I can extract all the files by "frecover -x -v -f -i /home " , I tried to add "-F" to intend to restore to local drive , but all the directories are omitted, all files are restored to local drives but not in its directory , how can I restore it to local drive and directory by directory ? thx.
Con O'Kelly
Honored Contributor

Re: Fbackup and restore

Hi

Have you tried using the "-X" (Capital X) option. This will restore to the current directory & include the directory structure.

# frecover -xv -X -f -i /home

Cheers
Con