/scripts/restorepkg behaviour in cpanel11

Support-SG

Registered
Mar 28, 2005
4
0
151
Hi All!

I've found that /scripts/restorepkg now works a little bit different like it worked in cpanel10. When we restore a full backup/cpmove file for an existing account it tells that this account already exists and stops restoration process, even when is being run with --force keyword. Is it possible to restore the backup for an existing account without its termination, like it was in cpanel10?

Thanks
--
Serg
 

cPanelDavidG

Technical Product Specialist
Nov 29, 2006
11,212
13
313
Houston, TX
cPanel Access Level
Root Administrator
Hi All!

I've found that /scripts/restorepkg now works a little bit different like it worked in cpanel10. When we restore a full backup/cpmove file for an existing account it tells that this account already exists and stops restoration process, even when is being run with --force keyword. Is it possible to restore the backup for an existing account without its termination, like it was in cpanel10?

Thanks
--
Serg
I know the developers are looking into fixing the --force keyword so it works as intended in cPanel 11. As for the remainder of your inquiry, I'll leave that for others to discuss.
 

TheKog

Active Member
Dec 23, 2004
43
0
156
Has this been fixed yet? We just moved to cpanel 11 from 10 and now are nightly backup and restore ops across servers are broken. We used to restore our backup right over an existing account on the backup server.
 

cPanelDavidG

Technical Product Specialist
Nov 29, 2006
11,212
13
313
Houston, TX
cPanel Access Level
Root Administrator
Has this been fixed yet? We just moved to cpanel 11 from 10 and now are nightly backup and restore ops across servers are broken. We used to restore our backup right over an existing account on the backup server.
I know there were several improvements to /scripts/restorepkg in September. If you are still experiencing these issues on the latest builds, please submit a support ticket.
 

TheKog

Active Member
Dec 23, 2004
43
0
156
I have submitted a ticket but can't see it's status -- we are with serverbeach and don't have a login here. I looked at the script for restorepkg and it's pretty obvious that other than a request for the user to issue a --force parm if the account exists, it is never passed on to the quickrestore code in whostmgr itself -- the parm is nothing more than window dressing.
 

Infopro

Well-Known Member
May 20, 2003
17,075
524
613
Pennsylvania
cPanel Access Level
Root Administrator
Twitter
I have submitted a ticket but can't see it's status -- we are with serverbeach and don't have a login here. I looked at the script for restorepkg and it's pretty obvious that other than a request for the user to issue a --force parm if the account exists, it is never passed on to the quickrestore code in whostmgr itself -- the parm is nothing more than window dressing.
SB tickets are a separate system. cPanels is here. https://tickets.cpanel.net/review/login.cgi
You should come in there from your WHM though the first time.
 

TheKog

Active Member
Dec 23, 2004
43
0
156
Sigh....

I did submit a ticket here at CP - #220123 - I used the form and submitted all our license info etc. HOWEVER I CANNOT LOGIN HERE AT CP TO SEE THE STATUS PER MY PREVIOUS POST. IT SEEMS I NEED SOME OTHER LOGIN ACCOUNT WITH CP TO DO THIS (SEPARATE FROM THE FORUMS LOGIN).

Seeing that the script is nothing but window dressing is distressing -- this forced update from 10.8 has caused more breakage and non-productive use of our time over things that worked fine back in 10.8 that we were happy with. However we were informed our license was expired so we had to update to cpanel 11. Gee thanks for the compatibility with the existing scripts and interfaces. Now we are blowing lots of time fixing things that weren't even broken. Real progress....
 

Infopro

Well-Known Member
May 20, 2003
17,075
524
613
Pennsylvania
cPanel Access Level
Root Administrator
Twitter
Well the docs for the API are here, not sure if this is helpful or not.
http://www.cpanel.net/plugins/xmlapi/

I do know your forums pass are not what you need to login to the ticket system though. When you submitted the ticket it should have emailed you with a link to check status. Anyway, I'm sure one of the guys will be by to help get you in there soon enough. Good luck.
 

TheKog

Active Member
Dec 23, 2004
43
0
156
Yep we did finally get an email with a password to check status. THanks for the pointer I'll have a look at the API.
 

cPanelDavidG

Technical Product Specialist
Nov 29, 2006
11,212
13
313
Houston, TX
cPanel Access Level
Root Administrator
Sigh....

I did submit a ticket here at CP - #220123 - I used the form and submitted all our license info etc. HOWEVER I CANNOT LOGIN HERE AT CP TO SEE THE STATUS PER MY PREVIOUS POST. IT SEEMS I NEED SOME OTHER LOGIN ACCOUNT WITH CP TO DO THIS (SEPARATE FROM THE FORUMS LOGIN).

Seeing that the script is nothing but window dressing is distressing -- this forced update from 10.8 has caused more breakage and non-productive use of our time over things that worked fine back in 10.8 that we were happy with. However we were informed our license was expired so we had to update to cpanel 11. Gee thanks for the compatibility with the existing scripts and interfaces. Now we are blowing lots of time fixing things that weren't even broken. Real progress....
Note that while you are welcome to script the use of cPanel/WHM scripts, if you are not using our APIs or other recommended means by which to do this, things may break during upgrades if such scripts are used long-term. Hence, the recommendation to use APIs and hooks whenever possible.

In the case that the functionality that you need is not supported, I would recommend submitting a feature request to http://bugzilla.cpanel.net to make us aware of the desire for a particular functionality.

Hooks are used when you want to edit the source code of cPanel/WHM's scripts. Using hooks will ensure that any customizations you perform will not get lost during upgrades. These will not edit the source of the scripts but will help you customize the performance of cPanel/WHM. Note that for every post- hook, there is an accompanying pre- hook.

Documentation for hooks can be found at: http://www.cpanel.net/support/docs/hooks.htm
 

TheKog

Active Member
Dec 23, 2004
43
0
156
Thanks you but these hooks do not help for what we are discussing here.

Once again we were thrilled with cpanel 10.8 -- it did everything we wanted including being able to overwrite an account on a cop, transfer, or restorepkg operation. Even cpanel developers must realize the --force behavior was necessary by many users because cpanel added it -- it just doesn't work. All we are asking is that it be fixed, like Serg who started this thread.
 

cPanelDavidG

Technical Product Specialist
Nov 29, 2006
11,212
13
313
Houston, TX
cPanel Access Level
Root Administrator
Thanks you but these hooks do not help for what we are discussing here.

Once again we were thrilled with cpanel 10.8 -- it did everything we wanted including being able to overwrite an account on a cop, transfer, or restorepkg operation. Even cpanel developers must realize the --force behavior was necessary by many users because cpanel added it -- it just doesn't work. All we are asking is that it be fixed, like Serg who started this thread.
I'd recommend submitting a support ticket regarding this issue directly to us so our support staff can work on you to resolve this issue.
 
C

cPanelBilly

Guest
I cant replicate this on my test environment. What version of cPanel are you running?

[[email protected] ~]# /scripts/restorepkg bvierra
Sorry, the user bvierra already exists on this system. If you really want to do this run /scripts/restorepkg --force bvierra
[[email protected] ~]# /scripts/restorepkg --force bvierra
cPanel restorepkg 2
Force Mode: yes
Reseller Privs Restore: yes

Searching /home....
Found backup-10.25.2007_14-57-24_bvierra.tar.gz !
Moving Packge to /home/cprestore/backup-10.25.2007_14-57-24_bvierra.tar.gz
Extracting tarball...................
Done
Extracting Domain....Done
Generating Account....Checking input data......Done
WWWAcct 12.0 (c) 1997-2007 cPanel, Inc.......Done
Running pre creation script (/scripts/prewwwacct)......Done
Adding User...groupadd: group bvierra exists
useradd: user bvierra exists
...Done
 

TheKog

Active Member
Dec 23, 2004
43
0
156
WHM 11.2.0 cPanel 11.11.0-S16999
CENTOS Enterprise 4.5 i686 - WHM X v3.1.0
We were told that it would be fixed in the November STABLE release. We only run STABLE.

I cant replicate this on my test environment. What version of cPanel are you running?

[[email protected] ~]# /scripts/restorepkg bvierra
Sorry, the user bvierra already exists on this system. If you really want to do this run /scripts/restorepkg --force bvierra
[[email protected] ~]# /scripts/restorepkg --force bvierra
cPanel restorepkg 2
Force Mode: yes
Reseller Privs Restore: yes

Searching /home....
Found backup-10.25.2007_14-57-24_bvierra.tar.gz !
Moving Packge to /home/cprestore/backup-10.25.2007_14-57-24_bvierra.tar.gz
Extracting tarball...................
Done
Extracting Domain....Done
Generating Account....Checking input data......Done
WWWAcct 12.0 (c) 1997-2007 cPanel, Inc.......Done
Running pre creation script (/scripts/prewwwacct)......Done
Adding User...groupadd: group bvierra exists
useradd: user bvierra exists
...Done