> On Sep 20, 2017, at 9:31 AM, Rosenbaum, Larry M. <rosenbau...@ornl.gov> wrote:
> 
> I expect the old system to be unavailable after the switch. How 
> would we move the queue files?

When possible, plan to allow the two to coexist during the transition.

In any case, to move the queue files (from the default Postfix
instance, otherwise repeat per non-default instance):

    # : on old server
    # postfix stop
    
    :  archive queue files from the default Postfix instance,
    :  on multi-instance servers repeat per non-default instance
    :
    # export MAIL_CONFIG=$(postconf -d config_directory)
    # name=$(postconf -xh syslog_name)
    
    # postsuper -h ALL
    # cd $(postconf -xh queue_directory)
    # umask 077
    # t=$(mktemp "/tmp/${name}-hold.tgz.XXXXXX")
    # tar czvf "$t" hold && mv "$t" "/tmp/${name}-hold.tgz"

Copy the tarball off the old server, stored not world-readable.
It is assumed below that either your new servers has an empty
"hold" queue, or you're willing to "release" any queue files
found there.

    # : on new server
    # : copy all the tarballs safely to a suitable directory
    # : and "cd" there
    # postfix stop

    # : per Postfix instance
    # export MAIL_CONFIG=$(postconf -d config_directory)
    # name=$(postconf -xh syslog_name)

    # qdir=$(postconf -xh queue_directory)
    # mail_owner=$(postconf -xh mail_owner)
    # postsuper -H ALL
    # (cd "${qdir}"; tar xzvf -) < "${name}-hold.tgz"
    # chown -R "${mail_owner}" "${qdir}/hold"

    # : repeat "postsuper -s" until it reports no further renames
    # postsuper -s

    # : release queue files from merged "hold" queue
    # postsuper -H ALL

    # : Make sure queue content looks OK
    # mailq

    # : repeat steps above for any other instances

    # : Finally start all the instances.
    # postfix start
   
-- 
        Viktor.

Reply via email to