If your netLD is running on Linux and it is using PostgreSQL as database (instead of the typical Apache Derby), follow the steps here to migrate your instance to VA.


This guide assumes netLD is running on CentOS 6/7.


On your Linux server


1. Stop the netLD service:

sudo service netld stop

2. Create a database backup as user netld:

sudo -i -u netld pgsql/bin/pg_dumpall -c > /tmp/netld.backup

3. Copy the backup from the Linux server to the VA. For example, from inside the VA:

scp root@<linux>:/tmp/netld.backup .


On VA


4. Activate netLD via web UI.


5. SSH into VA. SSH service can be turned on via the console. Please contact support for the SSH credentials.


6. Patch the backup:

sed -i 's/CREATE DATABASE netld.*/CREATE DATABASE netld WITH TEMPLATE = template0 OWNER = netld;/g' netld.backup

7. Stop the netLD service:

sudo /usr/local/etc/init.d/netld stop

8. Import the backup:

/usr/share/netld/pgsql/bin/psql -U netld -d postgres -f netld.backup > import.log 2>&1

9. Verify that no error messages exist in import.log, except the following:

psql:db.backup:23: ERROR:  current user cannot be dropped
psql:db.backup:30: ERROR: role "netld" already exists

10. Reset terminal log index:

sudo rm -rf /data/netld/lucene/*

11. Reset a few preferences that may contain incompatible values:

sudo su - netld -c '/usr/share/netld/dbutil prefreset org.ziptie.server.sshd:listenPort'
sudo su - netld -c '/usr/share/netld/dbutil prefreset org.ziptie.zap.web:bindHost'

12. Reboot VA.


13. Finished. Your data has been imported into netLD VA.