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 === |
| 4 | Beware DB locks! |
| 5 | * Don't keep Web2Py shell open longer than necessary |
| 6 | |
| 7 | {{{ |
| 8 | python web2py.py -S prod -M |
| 9 | db.export_to_csv_file(open('db.csv','wb')) |
| 10 | Ctrl+D |
| 11 | }}} |
| 12 | |
| 13 | Remove reference Tables from CSV file (don't want to import duplicates!) |
| 14 | |
| 15 | {{{ |
| 16 | python web2py.py -S dev -M |
| 17 | db.import_from_csv_file(open('db.csv','rb')) |
| 18 | db.commit() |
| 19 | Ctrl+D |
| 20 | }}} |
| 21 | |
| 22 | === Web services === |
| 23 | better to avoid locks |