Monitoring, Management & Location Tracking

 View Only
last person joined: one year ago 

Articles relating to existing and legacy HPE Aruba Networking products and solutions including AirWave, Meridian Apps, ALE, Central / HPE Aruba Networking Central, and UXI / HPE Aruba Networking User Experience Insight

How to use pg_dump to copy a table from one Airwave server to another? 

Mar 18, 2017 02:46 PM

Requirement:

Scenario: Need to copy guest user accounts from one Airwave to another.



Solution:

pg_dump is a utility for backing up a PostgreSQL database. It makes consistent backups even if the database is being used concurrently. Dumps can be output in script or archive file formats. Script dumps are plain-text files containing the SQL commands required to reconstruct the database to the state it was in at the time it was saved.

 

Execute the command -> # pg_dump -t guest_user -U airwave airwave > /tmp/guest_user

 

This command will generate a file guest_user in /tmp directory and it will contain all the commands to create a table and all the guest user exist in the database.



Configuration:

In order to import the guest users using the exported backup, the table should be dropped first.

 

Executing the command will do it, # dbc 'drop table guest_user'



Verification

Using the cat command, guest users could be imported, # cat /tmp/guest_user | db 

This command will create the table first, then copy the contents to it.

Statistics
0 Favorited
0 Views
0 Files
0 Shares
0 Downloads

Related Entries and Links

No Related Resource entered.