| 31 | | * Migrating data from Live to Dev for better testing |
| 32 | | * CSV (beware DB locks!) |
| 33 | | {{{ |
| 34 | | python web2py.py -S prod -M |
| 35 | | db.export_to_csv_file(open('db.csv','wb')) |
| 36 | | Ctrl+D |
| 37 | | }}} |
| 38 | | Remove reference Tables from CSV file (don't want to import duplicates!) |
| 39 | | {{{ |
| 40 | | python web2py.py -S dev -M |
| 41 | | db.import_from_csv_file(open('db.csv','rb')) |
| 42 | | db.commit() |
| 43 | | Ctrl+D |
| 44 | | }}} |
| 45 | | * Web services (better to avoid locks) |
| 46 | | * Currently needs to be done resource by resource (JOINed tables can be done together as Components of main resource) |
| 47 | | * need to do referenced tables before the tables which refer to them |
| 48 | | * migrate the locations first (using the xml interface), you can later migrate the orgs and offices together (through Component JOIN) |
| 49 | | * Ideally we want to develop a way of having all tables loaded together into RAM, refs fixed-up & then imported to db together |
| | 31 | * [wiki:DataMigration Migrating data from Live to Dev for better testing] |