LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-26-2006, 06:03 AM   #1
shipon_97
Member
 
Registered: Oct 2005
Location: Bangladesh
Posts: 504

Rep: Reputation: 31
Question 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........
 
Old 06-26-2006, 06:16 AM   #2
IBall
Senior Member
 
Registered: Nov 2003
Location: Perth, Western Australia
Distribution: Ubuntu, Debian, Various using VMWare
Posts: 2,088

Rep: Reputation: 62
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
 
Old 06-26-2006, 06:40 AM   #3
SlackDaemon
Member
 
Registered: Mar 2006
Distribution: RedHat, Slackware, Experimenting with FreeBSD
Posts: 222

Rep: Reputation: 30
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!
 
Old 06-26-2006, 12:03 PM   #4
shipon_97
Member
 
Registered: Oct 2005
Location: Bangladesh
Posts: 504

Original Poster
Rep: Reputation: 31
Cool 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 ..........
 
Old 06-26-2006, 12:45 PM   #5
w3bd3vil
Senior Member
 
Registered: Jun 2006
Location: Hyderabad, India
Distribution: Fedora
Posts: 1,191

Rep: Reputation: 49
you could as well create aliases for the users that you want to backup.
 
Old 06-26-2006, 04:17 PM   #6
Bonestein
LQ Newbie
 
Registered: Mar 2006
Posts: 3

Rep: Reputation: 0
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.
 
Old 06-26-2006, 08:36 PM   #7
IBall
Senior Member
 
Registered: Nov 2003
Location: Perth, Western Australia
Distribution: Ubuntu, Debian, Various using VMWare
Posts: 2,088

Rep: Reputation: 62
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
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Backup on mail server nic2 Linux - Enterprise 5 01-25-2006 03:16 PM
Backup Mail Server inversecow Linux - Networking 1 01-04-2006 02:30 PM
Qmail - Backup server looping mail ziggie216 Linux - Software 0 10-04-2005 12:44 PM
backup mail server ziggie216 Linux - General 1 12-28-2003 08:43 PM
sendmail and backup mail server gsimpson Linux - Software 6 07-11-2003 09:11 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:27 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration