Migrate your local PHP based application to the cloud with BitNami Cloud Hosting

    How to create our local database backup with phpMyAdmin

     
    This guide shows how to move your BitNami PHP based application Stack (like Wordpress, Drupal, Joomla!, SugarCRM and others) installed in your machine to the Cloud using BitNami Cloud Hosting. When you finish this tutorial, we will have an exact copy of our local application installation, but in the cloud.
     
    We will use BitNami Cloud Hosting in this Howto, but the steps are very similar for any cloud or hosting provider.
     
    First, we have to make a copy of your Application database. Go to http://127.0.0.1/phpmyadmin and input your login credentials. 
     
    Username: root
    Password: The password you chose when installing the Stack.
    03.png
     
     
    Now select the database that uses your application, for example: "bitnami_wordpress", "bitnami_drupal", etc. Got to the Export icon.
     
    05.png
     
    Select "Custom" option and scroll down and tick "Add DROP TABLE / VIEW / PROCEDURE / FUNCTION / EVENT statement".
    07.png
     
    09.png
    Make a mental note of where you save this file. We will need it later to restore the database in the remote machine.
     
    Another possibility is using the command line. You can also get the same backup file from the BitNami Console instead of using phpMyAdmin. This shell or command prompt has already loaded the Stack environment and you can run any command from it:
     

    linux_platform.png On Linux or mac_platform.png On OS X:

    $ mysqldump -u root -p bitnami_application > bitnami_application.sql
    

    win_platform.png On Windows:

    > mysqldump -u root -p bitnami_application > bitnami_application.sql

    Substitute the "bitnami_application" database for your application database name (for example "bitnami_wordpress" or "bitnami_drupal"). The password is the same that you set during the installation.

    How to sync files from the local machine to the remote machine

     
    We are going to need your BitNami Cloud Hosting private key to connect to your machine. To download it go to https://app.bitnamihosting.com/  and log in.
    BHC.png
     
    Start a new machine with your application or any other that you want to sync. Start the machine and click in "Manage". In this screen, click on "Connect".
    51.png
     
    Now click on "PPK" to download your private key file for Windows. If your local machine is Linux or OS X you should download the "PEM" key.
    52.png
     

    linux_platform.png

    mac_platform.png On Linux or OS X: You can use FileZilla or any other FTP program which supports the sFTP protocol. If you are familiar with command line you can use "rsync" or "scp" to upload the files.

    win_platform.png On Windows: We are going to use WinSCP to copy the files to the remote machine. Open your web browser and go to http://winscp.net/eng/download.php . Click on "Installation package" to download WinSCP and install it.

     
     
    12.png
     
    If you are on Windows Vista or Windows 7, it is advisable to run the application as "Administrator" user. In other case, maybe you have not access to all files in your local installation. This is the main window of the program.
     
    19.png
     
    - You will need to write the URL to your remote machine in the "Host name" field, without the "http://". For example, "yourapplication.bitnamiapp.com".
     
    - The username is "bitnami". It is not necessary a password.
     
    - Your "private key file" is the ppk file we downloaded earlier.
     
    Now, click on "Login".
     
    Since it is the first time you connect to the machine, it will warn you that it can't recognize it. Click yes to continue.
    20.png
     
    The folders to the left are in your local computer, and the folders to the right are the folders of the remote computer.
     
    In your computer, navigate to the folder you installed the BitNami Stack into, the default directory is C:\Program Files\BitNami Application Stack. Once you are there, enter the "apps" folder, and then the application folder (for example "wordpress"). You will see the same 4 folders you see in the screenshot ("conf", "htdocs", "licenses", "scripts"). You should go to htdocs folder.
     
    On the remote computer (the folders on the right), click on the icon of folder with the slash (see the mouse pointer in the screenshot). Go to "/" folder and then follow this path "/opt/bitnami/apps/your_application/htdocs". You should see now the same folder and files in the left (your machine) and in the right (the remote machine).
     
    Select every file on your computer (the left panel). It is important that you do not copy the database settings file which depends on the application.
     
    61 WinSCP select everything but the wp-config.php.png
     
    After selecting the files, click the copy button near the bottom left of the screen. Click "Copy" to start the process. We want to overwrite every file in the remote host without the database settings file. Click "Yes to all". This could take some time.
    27.png

    How to export the database to the remote machine with phpMyAdmin

     
    There are two options to access the remote phpMyAdmin application.
    1. You can create a secure pipe in your machine so any other user be able to access to the application. You can find more information at How to enable phpMyAdmin or phpPgAdmin remotely through SSH. This is the safest approach to connect to it.
    2. Enable phpMyAdmin to be able to access remotely. For security reasons, please revert this configuration once you finished to import the database.
     
    Last step, we are going to import the application database. When the machine completes the restart, go to http://your_url/phpmyadmin (for example, http://yourapplication.bitnamiapp.com/phpmyadmin).
     
    34.png
     
    Enter root as the username and your aplication password (if you don't remember it, it is available in the "Manage Server" screen from the https://app.bitnamihosting.com).
     
    Select the application database and click "Import". Then browse to the database you exported at the beginning of this Howto and Click "Go".
     
    40.png
    Some application require to restart the server. You can restart the server one last time (http://app.bitnamihosting.com, log in, select your server and click the "Restart" button).
    33.png
     
    Finally, enjoy your new Application running in the cloud. Note that now the user credentials to access to the remote application are the same that you set in your local application.
    Tag page (Edit tags)
    • No tags
    Pages that link here
    Page statistics
    21809 view(s), 43 edit(s) and 13960 character(s)

    Comments

    You must login to post a comment.

    Attach file

    Attachments

    FileSizeDateAttached by 
     01.png
    No description
    218.84 kB11:49, 18 Aug 2011josueActions
     02.png
    No description
    154.99 kB11:49, 18 Aug 2011josueActions
     03.png
    No description
    62.89 kB11:49, 18 Aug 2011josueActions
     04.png
    No description
    133.97 kB11:49, 18 Aug 2011josueActions
     05.png
    No description
    185.89 kB11:49, 18 Aug 2011josueActions
     06.png
    No description
    119.46 kB11:49, 18 Aug 2011josueActions
    07.png
    No description
    117.71 kB11:51, 18 Aug 2011josueActions
     08.png
    No description
    147.3 kB11:49, 18 Aug 2011josueActions
     09.png
    No description
    151.52 kB11:49, 18 Aug 2011josueActions
     10.png
    No description
    213.46 kB11:49, 18 Aug 2011josueActions
     11.png
    No description
    28.84 kB11:49, 18 Aug 2011josueActions
     12.png
    No description
    29.02 kB11:49, 18 Aug 2011josueActions
     13.png
    No description
    34.99 kB11:49, 18 Aug 2011josueActions
     14.png
    No description
    34.77 kB11:49, 18 Aug 2011josueActions
     15.png
    No description
    27.31 kB11:49, 18 Aug 2011josueActions
     16.png
    No description
    30.83 kB11:49, 18 Aug 2011josueActions
     17.png
    No description
    26.47 kB11:49, 18 Aug 2011josueActions
     18.png
    No description
    27.46 kB11:49, 18 Aug 2011josueActions
     19.png
    No description
    31.35 kB11:49, 18 Aug 2011josueActions
     20.png
    No description
    78.96 kB11:49, 18 Aug 2011josueActions
     21.png
    No description
    117.68 kB11:49, 18 Aug 2011josueActions
     22.png
    No description
    184.51 kB11:48, 18 Aug 2011josueActions
     23.png
    No description
    191.32 kB11:48, 18 Aug 2011josueActions
     24.png
    No description
    185.41 kB11:48, 18 Aug 2011josueActions
     25.png
    No description
    181.58 kB11:48, 18 Aug 2011josueActions
     26.png
    No description
    180.01 kB11:48, 18 Aug 2011josueActions
     27.png
    No description
    174.14 kB11:48, 18 Aug 2011josueActions
     28.png
    No description
    188.17 kB11:48, 18 Aug 2011josueActions
    29.png
    No description
    26.88 kB12:32, 18 Aug 2011josueActions
     30.png
    No description
    113.81 kB11:48, 18 Aug 2011josueActions
     31.png
    No description
    144.97 kB11:48, 18 Aug 2011josueActions
    32.png
    No description
    141.97 kB12:39, 18 Aug 2011josueActions
    33.png
    No description
    119.74 kB12:39, 18 Aug 2011josueActions
     34.png
    No description
    77.83 kB11:48, 18 Aug 2011josueActions
     35.png
    No description
    151.33 kB11:48, 18 Aug 2011josueActions
     36.png
    No description
    225.66 kB11:48, 18 Aug 2011josueActions
     37.png
    No description
    227.9 kB11:48, 18 Aug 2011josueActions
     38.png
    No description
    158.32 kB11:48, 18 Aug 2011josueActions
     39.png
    No description
    158.35 kB11:48, 18 Aug 2011josueActions
     40.png
    No description
    163.24 kB11:48, 18 Aug 2011josueActions
     41.png
    No description
    251.06 kB11:48, 18 Aug 2011josueActions
    50.png
    No description
    79.79 kB12:39, 18 Aug 2011josueActions
    51.png
    No description
    96.12 kB12:39, 18 Aug 2011josueActions
    52.png
    No description
    96.31 kB12:39, 18 Aug 2011josueActions
    53.png
    No description
    93.75 kB12:39, 18 Aug 2011josueActions
     54.png
    No description
    129.54 kB11:47, 18 Aug 2011josueActions
     55 Root console.png
    No description
    131.71 kB11:48, 18 Aug 2011josueActions
     56 WinSCP confirmatin.png
    No description
    27.45 kB11:48, 18 Aug 2011josueActions
     56 WinSCP root console.png
    No description
    21.88 kB11:48, 18 Aug 2011josueActions
     57 Edit phpmyadmin.png
    No description
    99.95 kB11:47, 18 Aug 2011josueActions
     58 Edit phpmyadmin.png
    No description
    32.91 kB11:47, 18 Aug 2011josueActions
     59 Edit phpmyadmin.png
    No description
    33.1 kB11:47, 18 Aug 2011josueActions
     60 Save.png
    No description
    30.64 kB11:47, 18 Aug 2011josueActions
     61 WinSCP select everything but the wp-config.php.png
    No description
    130.34 kB11:47, 18 Aug 2011josueActions
     BHC.png
    No description
    149.58 kB12:02, 18 Aug 2011josueActions