1833737 Members
2660 Online
110063 Solutions
New Discussion

Re: fbackup using sam

 
Ng Pea Har
Occasional Advisor

fbackup using sam

I scheduled a backup using sam to run at 23:55 everynight and I get these in my mail box after the backup:


br_backup: Invoking fbackup. See /var/sam/log/br_log for details.
fbackup(1004): session begins on Wed Aug 16 23:55:01 2000
fbackup(3203): volume 1 has been used 4 time(s)
fbackup(3024): writing volume 1 to the output file /dev/rmt/0m
fbackup(3007): WARNING: File number 2 (/home)
was active during attempt number 1
fbackup(1301): resuming at file 2
fbackup(3007): WARNING: File number 2 (/home)
was active during attempt number 2
fbackup(1301): resuming at file 2
fbackup(3007): WARNING: File number 2 (/home)
was active during attempt number 3
fbackup(1301): resuming at file 2
fbackup(3007): WARNING: File number 2 (/home)
was active during attempt number 4
fbackup(1301): resuming at file 2
fbackup(3007): WARNING: File number 2 (/home)
was active during attempt number 5
fbackup(1301): resuming at file 2
fbackup(3009): WARNING: File number 2 (/home)
was not successfully backed up

/var/sam/log/br_log shows exit_code 0 which means that the backup was successfully but why the mail box last sentence says "was not sucessfully backup up" and what is the warning "was active during attempt number 5"?

The directory I backup is nfs mounted. Both systems are HPUX 10.20. How can I be sure that the backup is reliable.

Thanks.
6 REPLIES 6
Animesh Chakraborty
Honored Contributor

Re: fbackup using sam

Hi,
Since your message is just a WARNING not an ERROR and more over the exit code is 0,I think you can rely on it.
We also get such types of warning even with exit code 4 still it works fine.
Thanks
Animesh
Did you take a backup?
Kofi ARTHIABAH
Honored Contributor

Re: fbackup using sam

Ng:

It appears that the /home has files that are open while fbackup is running.... you get that message if a file keeps changing while the backup is going on.

Find out what programs are running... that may be writing to /home ... use:

fuser -cu /home

it will list process id and you can find out the actual programs by using grep
nothing wrong with me that a few lines of code cannot fix!
Antoanetta Naghiu
Esteemed Contributor

Re: fbackup using sam

The warnings came from the open files that you have. fbackup doesn't backup up opened files. The backup session itself ginished successful, but the specific files that were opened are not backup.
This is why, usually, for a trusted backup, some of sys admin. go to single user mode, or just shutdown applications, or schedule the backup at that time when there are no users/apps runing in the box.
You said is a nfs sys that you are backing up. Do you export that /home file system with root access? (Does root from the box were you perform the backup have r/w access to the remote /home fs?). I guess, fbackup need it.
May I ask you why do not perform a local backup in that box? If doesn't have tape drive is not a problem, fbackup can work remotelly.
CHRIS_ANORUO
Honored Contributor

Re: fbackup using sam

Hi Ng Pea,

You can use fuser -k /home to kill the processes in that directory and then include umount in the cron to execute at 23:40 and then mount back at 23:45.
A simple cron addition of the fuser, umount and mount commands should help you out.

35 23 * * * fuser -k /home
40 23 * * * umount /home
45 23 * * * mount /home
55 23 * * * (your backup command)


Cheers!
When We Seek To Discover The Best In Others, We Somehow Bring Out The Best In Ourselves.
Trevor Dyson
Trusted Contributor

Re: fbackup using sam

Hi,

Here is what fbackup does when it backs up a file:

1) The modify timestamp of the file is checked
2) The file is written to the tape
3) The modify timestamp of the file is checked again and compared with the timestamp from step 1).
4) If the two timestamps are different then fbackup will decide that the file was modified while it was being backed up and the copy on the tape is bad.
5) fbackup starts again at step 1). fbackup will try a number of times (it looks like 5 times fromthe original message). The modify timestamp of the file at the start and end of being backed up must must be identical for fbackup to consider that it has been written correctly to tape.

The above behaviour has the following consequences.

a) If after 5 times fbackup was not able to write the file to tape without the timestamp changing (ie something modified the file) then the file will not be recoverable from the tape using frecover, i.e. the file appears to have not been backed up at all.

b) each time fbackup retries, the entire file is written to the tape. If fbackup retries 5 times there 5 copies of the file on tape. Only the last succesful retry will be recoverable. In the case above the last retry was unsuccesful so there are 5 copies of the file, non of them are recoverable using frecover.

c) if there are many files or large files being modified while fbackup is writing them to tape then you will waste a lot of time and tape. If the file being backed up is 1GB in size then it would have wasted 5GB of tape and still be unrecoverable from the tape.

As an earlier post suggested it is better to make sure that any applications or users are not allowed to modify files while they are being backed up.

Regards, Trevor
I've got a little black book with me poems in
Ng Pea Har
Occasional Advisor

Re: fbackup using sam

Thanks for all the help given.

I tried restoring files from the tape and compared them to the existing one in the system and they are the same.