commandlinetools
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| commandlinetools [2007/10/01 13:11] – faltin | commandlinetools [2007/10/01 16:23] (current) – faltin | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | |||
| ====== Command line tools ====== | ====== Command line tools ====== | ||
| - | NAV has some useful command lines tools. We document | + | NAV has some useful command lines tools. We document |
| ===== navclean.py ===== | ===== navclean.py ===== | ||
| + | Machine tracker data, i.e. ARP and CAM data, are never deleted from NAV. To delete old data run '' | ||
| + | the help option explains: | ||
| + | |||
| + | < | ||
| + | % ./ | ||
| + | Delete old arp and cam records from the NAV database. | ||
| + | |||
| + | Usage: navclean.py [options...] | ||
| + | |||
| + | Unless options are given, the number of expired ARP/CAM records will | ||
| + | be printed. | ||
| + | the expired records, add the -f option. | ||
| + | |||
| + | Available options are: | ||
| + | |||
| + | -h, --help | ||
| + | -q -- Be quiet. | ||
| + | -f -- Force deletion of expired records. | ||
| + | -e < | ||
| + | ago) on ISO format. | ||
| + | -E < | ||
| + | | ||
| + | | ||
| + | </ | ||
| + | |||
| + | ===== 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. | ||
| + | |||
| + | < | ||
| + | $ ./dump.py -h | ||
| + | usage: dump.py [options] | ||
| + | Dumps NAV database to importable files. | ||
| + | |||
| + | options: | ||
| + | -h, --help | ||
| + | -sSEP, --seperator=SEP | ||
| + | -tTABLE, --table=TABLE | ||
| + | -oFILE, --output=FILE | ||
| + | -a, --all dump all tables to files named TABLE.txt | ||
| + | |||
| + | </ | ||
| + | |||
| + | 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. | ||
| + | |||
| + | :!: Run ''/ | ||
commandlinetools.1191244314.txt.gz · Last modified: by faltin
