LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 04-09-2016, 11:12 PM   #1
lq_win
Member
 
Registered: Jul 2015
Posts: 66

Rep: Reputation: Disabled
Question How to safely migrate all postfix configs and mailboxes to new server.


Dear All.

How to safely migrate all of my previous postfix configs and mailboxes to new server?

Please help.

Thanks & Regards
Winanjaya
 
Old 04-11-2016, 04:45 AM   #2
ilesterg
Member
 
Registered: Jul 2012
Location: München
Distribution: Debian, CentOS/RHEL
Posts: 587

Rep: Reputation: 72
What have you found and done so far?
 
Old 04-11-2016, 06:26 AM   #3
lq_win
Member
 
Registered: Jul 2015
Posts: 66

Original Poster
Rep: Reputation: Disabled
Hi..
I plan to run these on old machine

export UGIDLIMIT=500
/etc/passwd
awk -v LIMIT=$UGIDLIMIT -F: '($3>=LIMIT) && ($3!=65534)' /etc/passwd > /home/passwd.mig

/etc/group
awk -v LIMIT=$UGIDLIMIT -F: '($3>=LIMIT) && ($3!=65534)' /etc/group > /home/group.mig

/etc/shadow
awk -v LIMIT=$UGIDLIMIT -F: '($3>=LIMIT) && ($3!=65534) {print $1}' /etc/passwd | tee - |egrep -f - /etc/shadow > /home/shadow.mig

/etc/gshadow
cp /etc/gshadow /home/gshadow.mig

backup mailboxes dir
tar -zcvpf /tmp/home.tar.gz /home

then restore it on New machine

# Restore

cd /path/to/location
cat passwd.mig >> /etc/passwd
cat group.mig >> /etc/group
cat shadow.mig >> /etc/shadow
/bin/cp gshadow.mig /etc/gshadow

then extract mailboxes
tar -zxvf /path/to/location/home.tar.gz

then copy all /etc/postfix to new machine

never try it ..

and hoping someone else experienced on this before ..

what is your idea or comment or suggestion?

Last edited by lq_win; 04-11-2016 at 06:27 AM.
 
  


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
Moving password and mailboxes to a new postfix mail server elishaeli Linux - Server 3 07-28-2012 04:11 AM
Help! Trying to safely migrate files from Windows to Linux. Syllinger Linux - Newbie 3 12-24-2011 06:33 PM
LXer: How To Migrate Mailboxes Between IMAP Servers With imapcopy LXer Syndicated Linux News 0 10-06-2011 05:00 PM
How to migrate some mailboxes between on line servers using postfix? jcmejiaf Linux - Server 1 11-09-2010 04:22 AM
LXer: How To Migrate Mailboxes Between IMAP Servers With imapsync LXer Syndicated Linux News 0 06-03-2009 06:10 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 01:30 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