Backup Full Reseller account
Hello Everyone,
I hope this is the correct section to post in for this query !
I would like to backup ONLY ONE RESELLER completely with all his accounts,
Can somebody let me know is there is a way to do this via WHM or if there is handly
one line via CLI to do this.
Thank you for your time.
-
There is no way to do it via WHM unless you plan to update the list of users everytime they add a new one, but you can do so using SSH like so: for i in $(whmapi1 listaccts searchtype=owner search=RESELLERUSERNAME want=user |grep user: | awk '{print $2}') ; do /scripts/pkgacct $i ; done
You would just change RESELLERUSERNAME with the actual resellers username, any accounts owned by that reseller will get a full cPanel account backup created in /home/0 -
Hey Jcats, Man Thank you a bunch once again :) You are wonderful ! 0 -
You can also change the location to where the backups get stored like so: for i in $(whmapi1 listaccts searchtype=owner search=RESELLERUSERNAME want=user |grep user: | awk '{print $2}') ; do /scripts/pkgacct $i /backup ; done
That would store all the backups in a folder called /backup - this might be handy if you have a backup drive mounted to the server0 -
Is it possible to change the destination folder, and do the accounts get compressed all in one file ? I just wanted to be clear before i commit one :) Thank you, 0 -
Got It, I missed your last update. thank you for the clarification :) 0 -
If we want to take it one step further then I would actually create a folder with a date first otherwise the old backups will get overwritten: currdate=$(date +%Y-%m-%d) ; mkdir -p /backup/"$currdate" ; for i in $(whmapi1 listaccts searchtype=owner search=RESELLERUSERNAME want=user |grep user: | awk '{print $2}') ; do /scripts/pkgacct $i /backup/"$currdate" ; done
ok Ill stop now :)and do the accounts get compressed all in one file ?
No, each account would have its own compressed file.0 -
You are the best ! 0 -
Hello @furquan, I'm glad to see the information you were provided was helpful. I'm marking this thread as solved. Thanks! 0
Please sign in to leave a comment.
Comments
8 comments