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.

Allowing resellers access to Backup via SCP

Discussion in 'General Discussion' started by cresedo, Aug 14, 2007.

  1. cresedo

    cresedo Member

    Joined:
    Nov 18, 2006
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    Hi there. We are in the process of moving from one dedicated server to another. We have several resellers and would like them to be as independent as possible during the transfer process, but have run into a stumbling block we're hoping someone could shed some light on.

    Is there a way to allow our resellers to use the Generate Full Backup via SCP and subsequently Restore Backup/cmovefile via their own login & password, i.e. without having to provide them with root access?

    Right now the only way the backup/restore works is if the root user & password for the remote server are entered (on the old server) within the account's cPanel, and if the root user then logs into the WHM on the new server and restores the backup from the Restore a Full Backup/cpmove file area. If the reseller tries to do a backup by entering their reseller user/pw, the backed-up account doesn't seem to show up in the WHM on the new server when they log in.

    Does anyone know if what we're trying to accomplish is possible, and if so, how it can be set up?

    Thanks very much!
     
  2. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Reseller users can be escalated to root-level access. This will not give them access to user root on the server, but as far as WHM is concerned, they would be able to access the full functionality of WHM. The main issue with this is when a full backup is generated, it is generated for the entire server - not just their users. There is no way to limit this via the cPanel or WHM interfaces short of only performing backups on a per-account basis either via cPanel or with /scripts/pkgacct.
     
  3. cresedo

    cresedo Member

    Joined:
    Nov 18, 2006
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    Hi David, thanks so much for your quick reply.

    Excellent. This might be the solution - to do this temporarily during the transfer period and then reset them to their normal reseller access once it's complete. Could you please point me to exactly where we can perform this escalation within the WHM?

    Could you please tell me more about this?

    Thanks so much,

    Kathryn
     
  4. cresedo

    cresedo Member

    Joined:
    Nov 18, 2006
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    I think I found this - under Reseller Center > Reseller Modifications > Edit Privileges/Nameservers > All Features (warning: root access)

    I just did a test with my own reseller account and the problem is that this gives the reseller access to everyone else's accounts on the server - not sure after all that this is the ideal solution.

    This said, I'd like to know if you can elaborate on the following part of your message as I'm not sure I fully understand:

    We have already been performing backups on a per-account basis via cPanel, so maybe I didn't explain my original post well enough!
     
  5. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    /scripts/pkgacct backs up an individual account to a .tar.gz file. For information on how to use the script, login as root in SSH and execute /scripts/pkgacct with no parameters.

    You can then use /scripts/unpkgacct on the new server to restore that account on the new server.
     
  6. cresedo

    cresedo Member

    Joined:
    Nov 18, 2006
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    Thanks, David. So this is another option that can only be done with root access, from what you seem to be saying.

    So to summarize and make sure I understand: there is no way for resellers to backup & restore their own clients' accounts on our new server without giving them root access... is that correct? We either give them root access or we have to do it for them account-by-account?
     
  7. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    /scripts/pkgacct does require user root access.

    As of this time, there is no easy way for a reseller to easily backup all data affiliated with that reseller and their clients. There is already a feature request in the system for this, it's up to you if you wish to vote for that feature or add yourself to the CC list to be informed regarding updates in that feature's implementation. You can view this feature request at:

    http://bugzilla.cpanel.net/show_bug.cgi?id=5425

    The only solution the resellers can do without having any sort of root access is a manual backup on an account by account basis.
     
  8. cresedo

    cresedo Member

    Joined:
    Nov 18, 2006
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    This is where I'm still confused. What I was trying (but obviously failed ;) ) to explain in my first post is that my resellers can't even do the manual backup on an account by account basis. When they try with under their reseller privileges, the account seems to back up OK, but when they go to restore it on the new server, the individual account they just backed up does not appear in the list to be restored.

    I'd love to be able to sort this out if you can help - please let me know if you need any further information or examples - and thank you very much for your patience, it's much appreciated!
     
  9. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    When the resellers are placing the archives on the new server, are they placing them in /home (not /home/username)? Does the file show up when they go to WHM -> Backups -> Restore a Full Backup/cpmove file?
     
  10. cresedo

    cresedo Member

    Joined:
    Nov 18, 2006
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    I just did another test to be perfectly accurate here...

    Here is what we're doing after logging in as the reseller, in the cPanel of the source account:

    Generate a Full Backup

    Backup Destination: Remote server via scp
    Email Address:
    Remote Server (FTP/SCB only): IP address of new server
    Remote User (FTP/SCB only): reseller's username
    Remote Password (FTP/SCB only): reseller's pw
    Port (FTP/SCP only):
    Remote Dir (FTP/SCP only):

    I then get a success message that says the file is here:

    pkgacctfile is: /home/backup-8.14.2007_14-50-44_username.tar.gz

    After logging into the WHM on the new server as the reseller, I now notice that the entire Backups section is completely missing, so I can't even tell whether or not the backup file is there.

    What are we doing wrong?
     
  11. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    You have root-level access on the new cPanel/WHM server, correct? Only root-level users can restore backups onto a cPanel/WHM server as well as create server-wide backups. That would explain the lack of a Backups section for your login there (if you do not have root-level access).
     
  12. cresedo

    cresedo Member

    Joined:
    Nov 18, 2006
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    I have root access yes, but my resellers do not. This is why I'm searching for a way for them to be able to back up and restore their own clients' accounts, even on an account-by-account basis.

    Interestingly, even when I log in as root, I do not see the account I just supposedly successfully backed up as the reseller.

    So it seems we're stuck again, right?
     
  13. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    I'd just double-check the files are really there in /home. If they are there then I'd recommend submitting a support request so our techs can evaluate the situation and determine what needs to be done for this to work for you.

    Resellers will not be able to restore their own accounts, but you definitely should be able to restore those accounts.
     
  14. cresedo

    cresedo Member

    Joined:
    Nov 18, 2006
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    Interesting. The files do not seem to be there. I wonder why I'd get the success email but the file is not actually there?
     
  15. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    I think I have a better understanding now. The backups are being created/transferred from cPanel -> Files -> Backup / Backup Wizard. Have you initiated a FTP or SCP connection from the original server to the new server just to ensure the connection works? It sounds like the backup is being generated (hence the success message) but for some reason isn't getting transferred to the new server.
     
  16. cresedo

    cresedo Member

    Joined:
    Nov 18, 2006
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    Well it all works perfectly well as long as we're logged in as root. We've already transferred over 50 accounts this way and it works beautifully. The only difference is when we're logged in as a reseller.

    No, I haven't tried this. How exactly would I do it?

    Thanks!
     
  17. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Many distributions come with a command-line FTP utility built-in, may want to try to see if executing "ftp" at the command line gets you to a help screen or interactive prompt to establish a connection with a remote server. I'm not familiar with SCP but it'd probably be very similar.
     
Loading...

Share This Page