No announcement yet.

Importing/merging database from old server into new database.

  • Filter
  • Time
  • Show
Clear All
new posts

  • Importing/merging database from old server into new database.


    A few days ago the tech support folks at my new host transferred my forum from my old shared host to my new dedicated server.

    I seem to have everything up and running but the database they imported is now 5 days old.

    I downloaded my old forum's database from my old host since the backup is made every night and is current.

    I'd like to merge/import the threads and posts that have been made in the 5 days since the database was moved.

    I don't have telnet/SSH access on my old host so I'd have to upload the database from my local computer to my new dedicated server and do it from there somehow.

    Is there an easy way to do this?


  • #2
    If I understand you correctly, your "old" server database backup is "current" and your "new" server was created with a backup which is 5 days old. If I am correct, what you want to do is access your new server through SSH and upload your last, most current database from the old server which is on your local machine.

    Once you have the current database uploaded to the root directory of your server, you need to go to the command line and enter:

    ./mysql -u (username with no brackets) -p (At the prompt enter the mysql password or you can put it in next to the -p here) name_of_new_database < /path_to_backup_file_with_ backup_file_name.

    For example:

    ./mysql -u root -pmypassword myvbdatabasename < /vbbackup01.20.08.sql

    I believe if you attempt to import you will lose userids and passwords, but I'm not sure of that part. But you should be able to import your database you downloaded from your old server, upload it to the new server through SSH and "install" it with the "mysql" command.

    Last edited by slappy; Wed 23rd Jan '08, 12:25pm.


    • #3
      You can't do a partial import. You will need to restore the latest backup. The method that slappy has said is the best method to use as it is the most reliable one. If you don't have SSH access, your host may restore the backup for you. The backup will need to be on your server (upload the backup file) to import it.
      Kerry-Anne :)

      Twitter Blog


      widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.