LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
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, 07:03 AM   #1
shipon_97
Member
 
Registered: Oct 2005
Location: Bangladesh
Posts: 490

Rep: Reputation: 30
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, 07: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, 07: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, 01:03 PM   #4
shipon_97
Member
 
Registered: Oct 2005
Location: Bangladesh
Posts: 490

Original Poster
Rep: Reputation: 30
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, 01:45 PM   #5
w3bd3vil
Senior Member
 
Registered: Jun 2006
Location: Hyderabad, India
Distribution: Fedora
Posts: 1,189

Rep: Reputation: 49
you could as well create aliases for the users that you want to backup.
 
Old 06-26-2006, 05: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, 09: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


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 04:16 PM
Backup Mail Server inversecow Linux - Networking 1 01-04-2006 03:30 PM
Qmail - Backup server looping mail ziggie216 Linux - Software 0 10-04-2005 01:44 PM
backup mail server ziggie216 Linux - General 1 12-28-2003 09:43 PM
sendmail and backup mail server gsimpson Linux - Software 6 07-11-2003 10:11 PM


All times are GMT -5. The time now is 03:06 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration