Skip to main content

Copying Part of the Mail folder to new hosting

Comments

3 comments

  • Jcats
    You would want to use rsync, it will only copy the emails that do not exist in the new location, example:
    # rsync -ahvz /backup/user/mail/domain.com/ /home/user/mail/domain.com/
    The first path is the path to the current backup where you want to sync the emails FROM, and the second path is the current path to where the live emails reside. If you are using rsync as root, you will want to chown the mail folder as the user after running rsync
    # chown -R user: /home/user/mail/domain.com
    0
  • cPanelMichael
    Hello, You may also want to run the following command when using instructions like the one in the previous response:
    /scripts/mailperm $username
    Thank you.
    0
  • tonyotonio
    You would want to use rsync, it will only copy the emails that do not exist in the new location, example:
    # rsync -ahvz /backup/user/mail/domain.com/ /home/user/mail/domain.com/
    The first path is the path to the current backup where you want to sync the emails FROM, and the second path is the current path to where the live emails reside. If you are using rsync as root, you will want to chown the mail folder as the user after running rsync
    # chown -R user: /home/user/mail/domain.com

    Just to note the rsync command 'rsync -ahvz' doesnt properly copy hard links. and may cause email usage to bloat
    0

Please sign in to leave a comment.