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.

Backup without /tmp directory

Discussion in 'General Discussion' started by EchoHost, Sep 12, 2005.

  1. EchoHost

    EchoHost Well-Known Member

    Joined:
    Jul 27, 2003
    Messages:
    52
    Likes Received:
    0
    Trophy Points:
    6
    Is there a way to do a bakcup without the /tmp directory of files.. my urchin files are up to 5GB big and the backup proccess due to this takes forever, especially to upload the backup to another server
     
  2. ramprage

    ramprage Well-Known Member

    Joined:
    Jul 21, 2002
    Messages:
    667
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Canada
    Try this, maybe the Cpanel backup will skip it if it doesn't have permissions?

    chmod 000 /home/username/tmp

    /scripts/pkgacct username
     
  3. sparek-3

    sparek-3 Well-Known Member

    Joined:
    Aug 10, 2002
    Messages:
    1,384
    Likes Received:
    23
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    There is an exclude parameter as part of the safesync subroutine in the pkgacct script. On my server it is seen around line 577:

    Code:
    %NFL = safesync(user=>$user,
        gidlist=>["cpanel","nobody"],
        source=>"${homedir}/",
        dest=>"${tarroot}/${prefix}${user}/homedir",
        chown=>0,
        delete=>1,
        verbose=>0);
    I believe this is where the actual backup processing takes place. You can add a section so that it might look something like:

    Code:
    %NFL = safesync(user=>$user,
        gidlist=>["cpanel","nobody"],
        source=>"${homedir}/",
        dest=>"${tarroot}/${prefix}${user}/homedir",
        chown=>0,
        delete=>1,
        exclude=>'/tmp',
        verbose=>0);
    If you search through the pkgacct script you will find the safesync subroutine and a list of parameters it will accept.

    It should be noted that if you make changes to the pkgacct script then those changes will be overwritten when you do a cpanel update. You'll have to do some fancy work to get this to work. I'm not real good at teaching how to make script changes, but this might help you find a better way.

    Also, I seem to recall there being something about CPanel not letting you modify the scripts in the scripts directory. So I don't really know if you will be able to make the changes at all without violating something. Other's on this forum might be able to give you a better idea on this issue. However, I don't know of any other way to access the exclude parameter without editting the script.
     
Loading...

Share This Page