How to restore a backup from another webhosting

Discussion in 'Installation' started by frenchwealthdiva, May 9, 2015.

  1. frenchwealthdiva

    frenchwealthdiva New Member

    Joined:
    Jan 20, 2014
    Messages:
    10
    My amember was install on a VPS hosting account. I did cancel my account and setup a new hosting account.
    I did backup my amember using the backup inside amember.

    When I try to restore the backup I do have an error.

    How can I restore this backup.

    thanks
  2. thehpmc

    thehpmc aMember Pro Customer

    Joined:
    Aug 24, 2006
    Messages:
    901
    So what is the error?? Also are you referring to aMember program or database.

    Do you still have access to the old hosting? Always bad thing to cancel old there could be something there to solve problems.

    Does your hosting use Cpanel because it will transfer domain content from one host to another?
  3. frenchwealthdiva

    frenchwealthdiva New Member

    Joined:
    Jan 20, 2014
    Messages:
    10
    Thank you "thehpmc" - the error is database error- cannot connect.

    No I don't have access anymore to my old hosting.

    Any other idea?
  4. thehpmc

    thehpmc aMember Pro Customer

    Joined:
    Aug 24, 2006
    Messages:
    901
    So presumably you have restored aMember program and MYsql database to new host. Presumably you have created new user for this database.

    Have you changed database user details in aMember config files?

    Short script to test database connection:
    PHP:
    <?php
    // Database details
      
    $db  '';
      
    $user  '';
      
    $pass  '';
      
    $host  'localhost';
      
    $prefix 'am_';
      
    $port  '';

    //Database access test
      
    $dsn 'mysql:dbname='.$db.';host='.$host;
       
      try {
      
    $db_conn = new PDO($dsn$user$pass);
    } catch (
    PDOException $e) {
      echo 
    "Could not connect to database";
      }
      echo 
    '<br>';
      echo 
    'V1.00<br>';   
      echo 
    'Bye';   
      
    ?>
    Change details in above script to those of the new database user, save it as a PHP file and upload it to your site.

    Run it and what is response?

Share This Page