The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

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:
    1
    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:
    16
    there is an option in the WHM Backup > restore backup function that shows " Restore Mail Config", try that out.
     
  3. Messiah

    Messiah Member
    PartnerNOC

    Joined:
    Jul 5, 2006
    Messages:
    22
    Likes Received:
    0
    Trophy Points:
    1
    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.
     
  4. yemoller

    yemoller Member

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

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

Share This Page