> Suggestion naman...i'm thinking of ways to back up
> mail data on my rh box running sendmail. Correct me if
> i'm wrong, but i think the only way i can make a
> consistent backup is by stopping sendmail, telling all
> users not to use mail, then back up /var/spool/mail
> and /var/spool/mqueue.

> What happens exactly when a user is reading his/her
> mail while backup is in progress? Will i get garbled
> mailboxes, or is there some write locking involved?
>
        yes, the only way to ensure that you have consistent backup is
make sure that no other process is using the file(s). but, stopping
sendmail is not a good idea. your backup is consistent with the state of
your files at the time you issued your backup command. you are not going
to get a garbled result in case your backup was executed while sendmail
was using the files. afaik, the backup will just get a copy (a read op) of
the current file(s) and dump it to a tape/nfs share. i think this is ok
because there will just be minor differences between the state of the
current file(s) and backup file(s) especially if you are doing the backup
regularly (as in every midnight or early morning). 
        if you want to make sure that only the backup process can use the 
file being under backup, you can try locking it temporarily using "lockfile" 
and unlock it after the backup is done. i am not pretty sure though if 
sendmail will complain in case it found the file it needs is in use. 
        furthermore, since backup is read operation, users will not get 
any garbled email.  

-rowel 

_
Philippine Linux Users Group. Web site and archives at http://plug.linux.org.ph
To leave: send "unsubscribe" in the body to [EMAIL PROTECTED]

To subscribe to the Linux Newbies' List: send "subscribe" in the body to 
[EMAIL PROTECTED]

Reply via email to