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.

Remote server rsync question

Discussion in 'Data Protection' started by DWHS.net, Oct 21, 2010.

  1. WebHostPro

    WebHostPro Well-Known Member
    PartnerNOC

    Joined:
    Jul 28, 2002
    Messages:
    1,594
    Likes Received:
    9
    Trophy Points:
    38
    Location:
    LA, Costa RIca
    cPanel Access Level:
    Root Administrator
    Twitter:
    Currently we rsync our servers to remote back ups servers.

    But to save lots of time we are considering not backing email.

    We use the "exclude" file for rsync but can't seem to find the right list of things to exclude to not back up emails.

    For example this would be a email file we would like to exclude:

    daily/username/homedir/mail/new/1220138292.H893460P21474.dwhs38.dwhs.net

    My best guess was:

    daily/*/homedir/mail/new/*

    To block this file from being rsynced.

    But no luck

    Thanks!
     
    #1 WebHostPro, Oct 21, 2010
    Last edited: Oct 21, 2010
  2. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,622
    Likes Received:
    24
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    Could you provide the actual rsync command? The path for the rsync determines the relative local path. You haven't provided sufficient information on what command is being used for the rsync to know what the relative path would be.

    Also, mail is normally at /home/username/mail/ location, so this would be /home/*/mail/* but if you are rsyncing starting with home, it may be the following:

    */mail/*
     
  3. WebHostPro

    WebHostPro Well-Known Member
    PartnerNOC

    Joined:
    Jul 28, 2002
    Messages:
    1,594
    Likes Received:
    9
    Trophy Points:
    38
    Location:
    LA, Costa RIca
    cPanel Access Level:
    Root Administrator
    Twitter:
    Sure:

    rsync --delete -vae ssh 66.123.123.12:/backup/cpbackup/daily /home/hostname/ --exclude '/root/exclude.txt'

    Then in the exclude file I have

    daily/username/homedir/mail/new/1220138292.H893460P21474.dwhs38.dwhs.net

    --

    I want to prevent all files for all users in the mail/new folder from being copied.

    Thanks again!
     
  4. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    15,258
    Likes Received:
    273
    Trophy Points:
    83
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
  5. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,622
    Likes Received:
    24
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    This is the issue, you are starting in /backup/cpbackup/daily and putting daily as the beginning location in the exclude file. You need to remove daily, so it should be:

    */homedir/mail/*
     
Loading...

Share This Page