Article Options
- Article History
- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Email to a Friend
- Printer Friendly Page
- Alert a Moderator
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Alert a Moderator
dump and restore AMP database tables
dump and restore AMP database tables
To DUMP a table from the database use the following command from the AWMS command line:
# pg_dump -t [TABLE_NAME] -Uairwave airwave
You can redirect the output to a file:
# pg_dump -t [TABLE_NAME] -Uairwave airwave > [FILENAME]
For example, to dump the seas_config table to a file of the same name in the /tmp directory:
# pg_dump -t seas_config -Uairwave airwave > /tmp/seas_config
To RESTORE a database table from a file, you would first drop the existing table from the database, then cat the file containing the dumped table you want to restore to the database. (Using the seas_config table as an example):
# dbc 'drop table seas_config'
# cat /tmp/seas_config | db
Version history
Revision #:
1 of 1
Last update:
06-09-2014
10:21 AM
Updated by: