AD MANAGEMENT

Collapse

BEHOSTED

Collapse

CPanel: Backup and Restore a Domain Account via SSH

Collapse

Collapse

Edit this module to specify a template to display.

X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • CPanel: Backup and Restore a Domain Account via SSH

    Sometimes there is a need to backup a CPanel account without logging into the endorsers CPanel yourself. In those situations the account can also be backed up via SSH. Every CPanel server comes with scripts that can be executed via SSH. In this case we will use the script:

    pkgacct

    from the /scripts folder on your server.

    1. Log into your server by using SSH

    * Change to the root user
    su - root

    (See our server security tutorial for more information on this login procedure)

    2. Change directories to the script directory by executing the following command: cd /scripts

    3. Execute the CPanel script for the account backup:

    ./pkgacct username
    (replace the username with the actual acount username that you are going to backup)

    The screen output will look similar to this:

    Copying domain Config...Done
    Copying Mail files....Done
    Copying proftpd file....Done
    Copying www logs...Done
    Grabbing mysql dbs...Done
    Grabbing mysql privs...Done
    Copying mailman lists....Done
    Copying mailman archives....Done
    Copying homedir....Done

    4. The backup file will be placed in the users home directory.

    You can now access the file and copy or move it to your backup drive or download it via ftp.


    How to restore a Domain Account via SSH


    1. Upload or copy the backup file (Example File Name: cpmove-joeuser.tar.gz) to the domain account Home directory via FTP.

    2. Log into your server by using SSH

    * Change to the root user
    su - root

    (See our server security tutorial for more information on this login procedure)

    3. Change directories to the script directory by executing the following command: cd /scripts


    4. Execute the appropriate CPanel script for the account restore:

    /scripts/restorepkg username
    (replace username with the domain account username)
    (make sure that the file name matches the necessary naming convention - follow the naming scheme seen in our example)

    This will restore the domain account from the backup, as well as it will create the CPanel account. We have not tried to do a restore on top of an existing CPanel account yet, but i have heard that this should work just fine.

  • #2
    i never tried it, i am usually does all the backup from inside the control panel
    but this looks handy for bigger sites

    thanks for this

    Comment


    • #3
      Great tutorial.

      I think the problem with SSH/Telnet use is the fact that most people aren't too familiar with any telnet commands. And, I'm referring to the average person here, since most of us are used to MAC/Windows systems.

      However, SSH is the way to go for LARGE websites.

      Comment


      • #4
        Sometimes there is a need to backup a CPanel account without logging into the endusers CPanel yourself. In those situations the account can also be backed up via SSH. Every CPanel server comes with scripts that can be executed via SSH. In this case we will use the script:
        Atlanta Web Development

        Comment


        • #5
          Hello jokester,

          Thanks for sharing useful tutorial.

          Kailash

          Comment

          TEXT

          Collapse

          160

          Collapse

          Unconfigured Ad Widget

          Collapse

          GOOGLE

          Collapse

          Announcement

          Collapse
          1 of 2 < >

          FreeHostForum Rules and Guidelines

          Webmaster forum - Web Hosting Forum,Domain Name Forum, Web Design Forum, Travel Forum,World Forum, VPS Forum, Reseller Hosting Forum, Free Hosting Forum

          Signature

          Board-wide Policies:

          Do not post links (ads) in posts or threads in non advertising forums.

          Forum Rules
          Posts are to be made in the relevant forum. Users are asked to read the forum descriptions before posting.

          Members should post in a way that is respectful of other users. Flaming or abusing users in any way will not be tolerated and will lead to a warning or will be banned.

          Members are asked to respect the copyright of other users, sites, media, etc.

          Spam is not tolerated here in most circumstances. Users posting spam will be banned. The words and links will be censored.

          The moderating, support and other teams reserve the right to edit or remove any post at any time. The determination of what is construed as indecent, vulgar, spam, etc. as noted in these points is up to Team Members and not users.

          Any text links or images contain popups will be removed or changed.

          Signatures
          Signatures may contain up to four lines

          Text in signatures is subject to the same conditions as posts with respect decency, warez, emoticons, etc.

          Font sizes above 3 are not allowed

          Links are permitted in signatures. Such links may be made to non-Freehostforum material, commercial ventures, etc. Links are included within the text and image limits above. Links to offensive sites may be subject to removal.

          You are allowed ONLY ONE picture(banner) upto 120 pixels in width and 60 pixels in height with a maximum 30kB filesize.

          In combination with a banner/picture you can have ONLY ONE LINE text link.


          Advertising
          Webmaster related advertising is allowed in Webmaster Marketplace section only. Free of charge.

          Shopping related (tangible goods) advertising is allowed in Buy Sell Trade section only. Free of charge.

          No advertising allowed except paid stickies in other sections.

          Please make sure that your post is relevant.


          More to come soon....
          2 of 2 < >

          Advertise at FreeHostForum

          We offer competitive rates and a many kinds of advertising opportunities for both small and large scale campaigns.More and more webmasters find advertising at FreeHostForum.com is a useful way to promote their sites and services. That is why we now have many long-term advertisers.

          At here, we also want to thank you all for your support.

          For more details:
          http://www.freehostforum.com/threads...eHostForum-com

          More ad spots:
          http://www.freehostforum.com/forums/...-FreeHostForum
          See more
          See less
          Working...
          X