This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | Next revision Both sides next revision | ||
commandlinetools [2007/10/01 13:16] faltin |
commandlinetools [2007/10/01 13:37] faltin |
||
---|---|---|---|
Line 32: | Line 32: | ||
months' | months' | ||
</code> | </code> | ||
+ | |||
+ | ===== dump.py ===== | ||
+ | |||
+ | The script extract data from the NAV database to text file(s). This is useful if you are migrating from one NAV installation to another and want to seed the new installation with the equipment you were monitoring in the old installation. | ||
+ | |||
+ | <code> | ||
+ | $ ./dump.py -h | ||
+ | usage: dump.py [options] | ||
+ | Dumps NAV database to importable files. | ||
+ | |||
+ | options: | ||
+ | -h, --help show this help message and exit | ||
+ | -sSEP, --seperator=SEP use SEP to seperate fields in output, [default :] | ||
+ | -tTABLE, --table=TABLE dump data from TABLE | ||
+ | -oFILE, --output=FILE dump data to FILE instead of stdout | ||
+ | -a, --all dump all tables to files named TABLE.txt | ||
+ | |||
+ | </code> | ||
+ | |||
+ | The tables you typically want export from are the tables that give data for bulk import when seeding the database. This will include: | ||
+ | |||
+ | * netbox | ||
+ | * room | ||
+ | * location | ||
+ | * org | ||
+ | * usage | ||
+ | * type | ||
+ | * vendor | ||
+ | * subcat | ||
+ | * prefix | ||
+ | * service | ||
+ | |||
+ | We currently do not support cabling and patch. | ||