Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

restoring e-mail forwarders form cpbackup?

Discussion in 'Data Protection' started by yemoller, Sep 4, 2006.

  1. yemoller

    yemoller Member

    Joined:
    Jun 3, 2003
    Messages:
    24
    Likes Received:
    0
    Trophy Points:
    151
    I had to restore a couple of accounts on my server form cpbackups today and now I'm noticing that e-mail forwarders were not restored on some accounts.

    I have a couple of older cpbackups of the accounts but I'm unable to find any files in the backups that contain the forwarders.


    How do i restore e-mail forwarders only form a cpbackup (what file do i copy to the users account)?


    Any help is appreciated!
     
  2. tweakservers

    tweakservers Well-Known Member

    Joined:
    Mar 30, 2006
    Messages:
    379
    Likes Received:
    0
    Trophy Points:
    166
    there is an option in the WHM Backup > restore backup function that shows " Restore Mail Config", try that out.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. Messiah

    Messiah Member
    PartnerNOC

    Joined:
    Jul 5, 2006
    Messages:
    22
    Likes Received:
    0
    Trophy Points:
    151
    Mail forwarders are listed in text files contained within /etc/valiases/. For example, an alias blahblah@google.com that forwards to postmaster@google.com would be recorded as the following entry in /etc/valiases/google.com
    blahblah@google.com: postmaster@google.com

    So basically, all the forwarders for example.com are contained within /etc/valiases/example.com. The entire valiases directory is backed up with cpbackups. You'll need to extract the tarball then copy the domain's valias file to /etc/valiases/. Here's an example:
    I'll pretend you're restoring forwarders for example.com, and that your backup directory is /backup, and that you are restoring the daily backup:
    tar -xzf /backup/cpbackup/daily/dirs/_etc_valiases.tar.gz
    cp -p /backup/cpbackup/daily/dirs/etc/valiases/example.com /etc/valiases/example.com

    You'll be prompted to overwrite. Confirm. That should do it.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. yemoller

    yemoller Member

    Joined:
    Jun 3, 2003
    Messages:
    24
    Likes Received:
    0
    Trophy Points:
    151
    Thanks Messiah, found the forwarders !! :D

    Strange though, that only some accounts were affected.
     
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice