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 make full backups for all my cpanel accounts from SSH

Discussion in 'Data Protection' started by Dioartis, Oct 29, 2015.

  1. Dioartis

    Dioartis Registered

    Joined:
    Jun 19, 2015
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Moldova
    cPanel Access Level:
    Root Administrator
    How to make full backups for all my cpanel accounts from SSH?
     
  2. nickg78

    nickg78 Member

    Joined:
    May 7, 2004
    Messages:
    11
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    Athens, Greece
    cPanel Access Level:
    Root Administrator
    Try this:

    for user in `ls /var/cpanel/users | grep -v "\."`;do /scripts/pkgacct $user;done

    The backups will be created as cpmove files in the home directory.
     
    texo likes this.
  3. madmanmachines

    madmanmachines Well-Known Member

    Joined:
    Nov 28, 2014
    Messages:
    94
    Likes Received:
    3
    Trophy Points:
    8
    cPanel Access Level:
    Root Administrator
    While the above should work, parsing against `ls' output is bad form. Why not use the `/etc/trueuserdomains' file? As well, command substitution with backticks is only recommend for non-POSIX-compatible bourne-shells
    BashFAQ/082 - Greg's Wiki
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    651
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
Loading...

Share This Page