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.

how to exclude accounts from cpbackup?

Discussion in 'cPanel Developers' started by sharmaine001, Jun 19, 2010.

  1. sharmaine001

    sharmaine001 Well-Known Member

    Joined:
    Jun 23, 2006
    Messages:
    143
    Likes Received:
    0
    Trophy Points:
    16
    I have a script running daily that computes for the total usage of all the accounts in my server

    I am writing it in a file to keep track of it

    Now I want to insert in my script that if the account is more than 5 GB, i will exclude that account from cpbackup

    I know in scripts2/backupusers that i can select only the accounts that will be backed up by cpbackup

    but is there a file or database that is being referenced by scripts2/backupusers? And how i can access this file in my script such that if the total usage of an account is > 5 GB, my script will exclude this account from scripts2/backupusers (select users in cpanel's "backup")
     
  2. madaboutlinux

    madaboutlinux Well-Known Member

    Joined:
    Jan 24, 2005
    Messages:
    1,052
    Likes Received:
    2
    Trophy Points:
    38
    Location:
    Earth
    No, you will have to write down your own code. If you could paste the code you use to compute the total usage of an account, people here can write down the necessary code for you to exclude the accounts over 5GB.
     
  3. sharmaine001

    sharmaine001 Well-Known Member

    Joined:
    Jun 23, 2006
    Messages:
    143
    Likes Received:
    0
    Trophy Points:
    16
    I just looped all the accounts from /home and use the php commands to compute for the total file size. IM using php code

    Basically all i need to do is find out where cpbackup stores the records of which accounts are checked when you go to WHM - Backups - Select Users
     
  4. sharmaine001

    sharmaine001 Well-Known Member

    Joined:
    Jun 23, 2006
    Messages:
    143
    Likes Received:
    0
    Trophy Points:
    16
    Found the file!

    It's /etc/cpbackup-userskip.conf

    Just put the cpanel username here per line and that's it
     
Loading...

Share This Page