Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Note

This page is outdated and no longer receives updates!

Home          Previous Page           Next Page

...

The typical command to back up your entire database is:

  • -uroot = use username of root

  • -p = ask for password

  • -e = extended inserts (makes the dump 10x smaller)

  • --single-transaction = run this in a single transaction (to prevent corruption)

  • -q = quick

  • -r = file location to store

  • openmrs = name of your database

If you want to automate it, you can provide the username and password for mysql in the command:

...

The now get the data out of an archived sql backup file and into a new database its merely three simple steps:

  1. Create your new database

    1. create database openmrsbackuprestoration default character set utf8;

  2. Tell mysql to work against that new database

    1. use openmrsbackuprestoration

  3. Run the sql file

    1. source backup.sql

Now wait for 1, 20, or 30 minutes and you'll have all your data back.