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.
|