Changes between Version 1 and Version 2 of UserGuidelines/Admin/DataMigration/Haiti


Ignore:
Timestamp:
01/16/10 21:48:04 (15 years ago)
Author:
Fran Boon
Comment:

--

Legend:

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

    v1 v2  
    11== Data Migration ==
    22
    3   * CSV (beware DB locks!)
    4    {{{
    5    python web2py.py -S prod -M
    6    db.export_to_csv_file(open('db.csv','wb'))
    7    Ctrl+D
    8    }}}
    9    Remove reference Tables from CSV file (don't want to import duplicates!)
    10    {{{
    11    python web2py.py -S dev -M
    12    db.import_from_csv_file(open('db.csv','rb'))
    13    db.commit()
    14    Ctrl+D
    15    }}}
    16   * Web services (better to avoid locks)
     3=== CSV ===
     4Beware DB locks!
     5 * Don't keep Web2Py shell open longer than necessary
     6
     7{{{
     8python web2py.py -S prod -M
     9db.export_to_csv_file(open('db.csv','wb'))
     10Ctrl+D
     11}}}
     12
     13Remove reference Tables from CSV file (don't want to import duplicates!)
     14
     15{{{
     16python web2py.py -S dev -M
     17db.import_from_csv_file(open('db.csv','rb'))
     18db.commit()
     19Ctrl+D
     20}}}
     21
     22=== Web services ===
     23better to avoid locks
    1724   * Currently needs to be done resource by resource (JOINed tables can be done together as Components of main resource)
    1825    * need to do referenced tables before the tables which refer to them
     
    2027   * Ideally we want to develop a way of having all tables loaded together into RAM, refs fixed-up & then imported to db together
    2128
     29=== Synchronisation ===
     30BluePrintSynchronisation