LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Backup Mail from One server to another (https://www.linuxquestions.org/questions/linux-newbie-8/backup-mail-from-one-server-to-another-458391/)

shipon_97 06-26-2006 07:03 AM

Backup Mail from One server to another
 
Friends ,

I need some help about my mail server . I have a Mail server where "All OutSide" Mail is stored , suppose it's IP is 202.59.136.1. I have another server which is locally used (Ip 192.168.10.1) . Both server i have configured Sendmail .

Now i want to BACKUP my mail from REAL server to LOCAL network server . So that my mail is not destroyed . Is it possible ? If it is possible plz inform me .......



Thx........

IBall 06-26-2006 07:16 AM

I think that mail is usually stored in /var/mail/. Therefore, you should be able to use rsync to copy the mail from the actual server to the backup server. On the local server:
Code:

rsync -avz userName@202.59.136.1:/var/mail/ ~/mailBackup
Obviously, "userName" is a user on the remote system, with read access to /var/mail. In this case, the mail is being backed up to /home/localUser/mailBackup.

I hope this helps
--Ian

SlackDaemon 06-26-2006 07:40 AM

Hi,

What IBall said is correct but keep in mind that mail is moved from /var/spool/mail/<username> files to the respective users home directory ($HOME/mbox or $HOME/Mail) once an email has been read. be sure to back these up as well if you wish to preserve existing mail.

best of luck!

shipon_97 06-26-2006 01:03 PM

Mail BNackup from One Server to Other server
 
Dear IBall ,

1) I want , My mail backup system does work automatically i.e., My Mail restore from Main server to others automatically . Is there any solution regarding this purpose ?

2) When i backup my mail , then using which server , i need to take my backup ? From Network server (192.168.10.1 ) ?

Sorry for disturb ..........

w3bd3vil 06-26-2006 01:45 PM

you could as well create aliases for the users that you want to backup.

Bonestein 06-26-2006 05:17 PM

create a file and put IBalls line in there and chomd u+x or 777 or whatever you want to do to make the file executable.

Code:

rsync -avz userName@202.59.136.1:/var/mail/ ~/mailBackup
for autmation, create a entry in the crontab to have this command run each day or twice a day

Code:

crontab -e
should allow you to make an entry

just read the man file, it's pretty short and to the point.

IBall 06-26-2006 09:36 PM

Quote:

2) When i backup my mail , then using which server , i need to take my backup ? From Network server (192.168.10.1 ) ?
The rsync line I gave you above will copy whatever is in /var/mail on the public server 202.x.x.x to the specified directory on the private server 192.168.x.x.

Rsync will only copy files from the remote server that have been modified since the local copy was modified.

--Ian


All times are GMT -5. The time now is 09:06 PM.