Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

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:
    153
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    texo likes this.
  3. madmanmachines

    madmanmachines Well-Known Member

    Joined:
    Nov 28, 2014
    Messages:
    94
    Likes Received:
    4
    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 Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    45,384
    Likes Received:
    1,951
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice