Changes between Version 20 and Version 21 of UserGuidelines/Admin/DataMigration/Haiti


Ignore:
Timestamp:
01/20/10 22:12:55 (12 years ago)
Author:
Fran Boon
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • UserGuidelines/Admin/DataMigration/Haiti

    v20 v21  
    181181 * {{{SyntaxError: invalid table name: rms_sms_request}}}
    182182
    183 To resolve this
     183To resolve this:
     184 * Take site down (I did this the ugly way!)
     185{{{
     186vim /etc/crontab
     187/etc/init.d/apache2 stop
     188}}}
     189 * Backup all Data
     190{{{
     191cd /home/haiti/prod
     192mkdir databases2
     193cp -ar databases/* databases2
     194rm -rf databases
     195}}}
     196 * Copy data down locally to be able to analyse easily, export as CSV
     197{{{
     198tar cvf prod_db.tar databases2
     199gzip -9 prod_db.tar
     200sz prod_db.tar.gz
     201}}}
     202 * Allow model to recreate databases (owned as www-data)
     203  * http://haiti.sahanafoundation.org
     204 * Restore Data
     205  * Edit CSV file using a text editor (not MS Excel!)
     206   * remove reference tables & intiial records which are created by {{{models/zzz_1st_run.py}}} (NB This didn't seem to work properly on this occasion!)
     207  * Import CSV segments to see which parts work:
     208{{{
     209cd /home/haiti/web2py
     210python web2py.py -S prod -M -N
     211db.import_from_csv_file(open('prod_part1.csv','rb'))
     212db.commit()
     213Ctrl+D
     214}}}
    184215=== Web Services ===
    185216Better to avoid locks & do without SSH login