Copying Addon Domains to a New Account - PowerPoint PPT Presentation

About This Presentation
Title:

Copying Addon Domains to a New Account

Description:

An entirely new account can be created from an addon domain. For this purpose, the addon domain’s information needs to be copied and added to the newly-created account. – PowerPoint PPT presentation

Number of Views:29
Slides: 20
Provided by: htshosting
Category: Other
Tags: domains

less

Transcript and Presenter's Notes

Title: Copying Addon Domains to a New Account


1
Copying Addon Domains to a New Account
2
Table of Contents
  • Introduction
  • Example Values
  • Create a Backup File
  • Create a New Account
  • Extract the Backup File
  • Extract the Backup File (Continued)
  • Import the Databases
  • Update Cron Job Paths
  • Change File Ownership
  • Confirm the Functioning of the Account
  • Remove the Addon Domain
  • Change the Placeholder Domains Name
  • Copy Over Email Account Information
  • Change the Ownership of Files
  • Log in Confirmation

3
Introduction
  • Once you have created an addon domain, an
    entirely new account can be created from that
    addon domain. For this purpose, the information
    from the addon domain needs to be copied and
    added to a newly-created account.
  • The following slides will run you through the
    steps involved in copying addon domains to a new
    account. The information that has been provided
    here is valid for only version 54 and the earlier
    versions of cPanel WHM. The Convert Addon
    Domain to Account interface of WHM needs to be
    used for cPanel WHM version 56 and later.
  • WHM gtgt Home gtgt Transfers gtgt Convert Addon Domain
    to Account
  • It needs to be mentioned here that only the root
    user or those resellers, who have root-level
    privileges, will be able to carry out this
    action, as it requires moving files.

4
Example Values
  • The below-mentioned example values are used in
    the information contained in the following
    slides.
  • username It represents the accounts user.
  • newusername It represents the new accounts
    user.
  • addonname It represents the addon domains
    name.
  • addondirectory It represents the addon domains
    directory.
  • To digress, the facility to register and transfer
    domains is provided by many web hosting
    companies, such as HTS Hosting. HTS Hosting has
    been consistently referred to as the Best Web
    Hosting Company, the Best Cloud Hosting
    Company, etc. due to the high quality of service
    offered by it at affordable prices.

5
Create a Backup File
  • Carry out full backup of the account which
    contains the addon domain. Use the Backups
    interface of cPanel (cPanel gtgt Home gtgt Files gtgt
    Backups) for this purpose, or run the following
    script
  • /usr/local/cpanel/scripts/pkgacct

6
1-800-123 -8156
  • Whoa! Thats a big number, arent you
    proud?

7
Create a New Account
  • Create a new account that has a placeholder name
    in the Create a New Account interface in WHM.
  • WHM gtgt Home gtgt Account Functions gtgt Create a New
    Account
  • It needs to be mentioned here that you should not
    use the name of the addon domain as the new
    account name.

8
Extract the Backup File
  • The below-mentioned steps need to be performed to
    extract the backup file.
  • Create the /home/backup-username directory by
    running the following commands
  • mkdir /home/backup-username
  • mv cpmove-username.tar.gz /home/backup-username/
  • ! Then move the backup file into it.
  • Navigate to the /home/backup-username directory
    by running the following commands
  • tar -xzf cpmove-username.tar.gz
  • cp /home/backup-username
  • Then the backup needs to be uncompressed.
  • It needs to be mentioned here that the
    above-mentioned commands extract the contents of
    the backup file to either the cpmove-username or
    username directories.

9
Extract the Backup File (Continued)
  • Run the following command
  • cp -R homedir/public_html/addondirectory/
    /home/newusername/public_html/
  • This command adds the homedir/public_html/addondir
    ectory/ subdirectory to the /home/backup-username/
    public_html/ directory.

10
Import the Databases
  • Carry out the following steps to import the
    databases
  • Recreate the databases of the addon domain and
    create the database users in the MySQL Databases
    interface in cPanel.
  • cPanel gtgt Home gtgt Databases gtgt MySQL Databases
  • Prepend newusername to the databases at the time
    when you create them. An example of this is when
    you create the newusername_dbname file. In it,
    dbname represents the name of the database.
  • Import the database backups of each domain, after
    creating the databases and database users. For
    this purpose, you need to run the below-mentioned
    command for each backup.
  • mysql newaccount_dbname lt /home/backup-username/us
    ername/mysql/username_dbname.sql

11
Update Cron Job Paths
  • You need to carry out the following steps for
    updating the new accounts cron paths
  • Open the /home/backup-username/username/cron/usern
    ame file. Then check for the cron jobs of the
    addon domain.
  • Add the paths for the cron jobs of the addon
    domain to the new account in the Cron Jobs
    interface in cPanel.
  • cPanel gtgt Home gtgt Advanced gtgt Cron Jobs
  • You need to ensure that the paths of the cron
    jobs match the paths of the new account to the
    same cron jobs files.

12
Change File Ownership
  • The chown command needs to be used in order to
    grant ownership of the copied public_html files
    to the newusername user.
  • find /home/newusername/public_html -uid 0
    -exec chown newusernamenewusername

13
Confirm the Functioning of the Account
  • You must confirm that the account functions
    properly after any change in the ownership of the
    files. To ensure this, you have to point the
    hosts file of your operating system to the
    temporary domain placeholder.

14
Remove the Addon Domain
  • Remove the addon domain of the old account in the
    Addon Domains interface in cPanel.
  • cPanel gtgt Home gtgt Domains gtgt
    Addon Domains

15
Change the Placeholder Domains Name
  • Navigate to the Modify an Account interface in
    WHM.
  • WHM gtgt Home gtgt Accounts gtgt Modify
    an Account
  • Next, change the main domain name of the new
    account to the name of the addon domain.

16
Copy Over Email Account Information
  • Change the domain name. After that, copy the
    emails, forwarders, autoresponders, and filters
    of the old account to the new account. For that
    purpose, you need to open the /home/backup-usernam
    e/username directory and then run the following
    commands
  • cp va/addonname /etc/valiases/
  • cp vf/addonname /etc/vfilters/
  • cp homedir/.autorespond/addonname
    /home/newusername/.autorespond/
  • cp -R homedir/etc/addonname /home/newusername/etc/
  • cp -R homedir/mail/addonname /home/newusername/mai
    l/

17
Change the Ownership of Files
  • Once you have copied the emails, filters,
    forwarders and autoresponders, you need to change
    the ownership of those files to the new user. You
    should run the following commands to attain that
  • chown newusernamemail /etc/valiases/addonname
  • chown newusernamemail /etc/vfilters/addonname
  • chown newusernamenewusername /home/newusername/.a
    utorespond/addonname
  • find /home/newusername/etc -uid 0 -exec chown
    newusernamemail
  • find /home/newusername/mail -uid 0 -exec chown
    newusernamemail
  • You should append asterisks ( ) on either side
    of addonname to ensure that it keeps the
    wildcards.

18
Log in Confirmation
  • You need to confirm that you can log in to the
    Webmail account of the user after you have
    changed the files ownership.
  • Navigate to the /home/newusername/etc/addonname
    directory and find the users as well as the email
    passwords for authentication to Webmail, IMAP,
    and POP3.

19
Thanks!
  • ANY QUESTIONS?
  • www.htshosting.org
Write a Comment
User Comments (0)
About PowerShow.com