Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 5 of 5
  1. #1
    Member
    Join Date
    Jul 2005
    Location
    Sticky On Internet
    Posts
    555

    Unhappy how to /scripts/pkgacct with multiple accounts.

    hi,
    any one with a script to backup 10 or 20 or more accounts using /scripts/pkgacct username in ssh,
    Iam 700 accounts manually, and its taking ages for me to package each account then copy to another server and so on.

    copy account from another server options seems broken even when both server are running same version.

    Code:
    Warning: file location not sent.. guessing.. this may not work ....
    Using the single archive method (/home/cpmove-hidden.tar.gz)!
    Transfer ErrorThe remote server didn't report a correct md5sum of the archive. Please ensure you selected the correct type of remote server.
    see ya.
    mohit
    Learn atleast A word Daily

    7+1 Dedicated Boxes with cPanel...

  2. #2
    BANNED
    Join Date
    Jun 2005
    Location
    Wild Wild West
    Posts
    2,025

    Lightbulb

    You would just need a simple loop script for that to read in the list
    of users on the server and run /scripts/pkgacct against each username

    Code:
    #!/bin/bash
    IFS="$"
    
    cd /var/cpanel/users
    
    find .  -type 'f' | while read CPUSER; do
      echo "Now processing ${CPUSER} ..."
      /scripts/pkgacct ${CPUSER}
    done
    All the backups would end up under /home as cpmove files and
    you could just use FTP to transfer them to any server

  3. #3
    Member
    Join Date
    Jul 2005
    Location
    Sticky On Internet
    Posts
    555

    Default

    hi,
    thanks for the excellent script, but i want to specify the usernames manually, may be 10-15 at a time only.

    can you help me .

    thanks for sparing your time.

    see ya,
    mohit
    Learn atleast A word Daily

    7+1 Dedicated Boxes with cPanel...

  4. #4
    BANNED
    Join Date
    Jun 2005
    Location
    Wild Wild West
    Posts
    2,025

    Lightbulb

    Just a slight variation in that case ...

    Create a file named "backup.txt" with the usernames of the accounts
    that you want to backup (one username per line):

    Code:
    #!/bin/bash
    IFS="$"
    
    cat ./backup.txt | while read CPUSER; do
      echo "Now processing ${CPUSER} ..."
      /scripts/pkgacct ${CPUSER}
    done

  5. #5
    Member
    Join Date
    Aug 2006
    Posts
    34

    Default

    How about a script that would either ftp or scp all the backed-up accounts to the other server?

Similar Threads & Tags
Similar threads

  1. /scripts/pkgacct does not export SSL cert and dedicated IP
    By belon_cfy in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 12-25-2009, 05:47 AM
  2. /scripts/pkgacct error ...any help?
    By sintman in forum Data Protection
    Replies: 7
    Last Post: 06-06-2008, 12:29 PM
  3. /scripts/pkgacct question
    By celliott in forum cPanel and WHM Discussions
    Replies: 3
    Last Post: 01-23-2008, 03:54 AM
  4. Backup using /scripts/pkgacct twice daily
    By djblamire in forum cPanel and WHM Discussions
    Replies: 3
    Last Post: 07-08-2007, 09:53 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube