Moving a Single Host Database

With the Single Host template, you can specify moving a database to another host, while it is still running.

NuoDB Manager

# Show what hosts this Database uses
nuodb [domain] > show database hosts
Database: 
[broker] * ec2-54-200-117-181.us-west-2.compute.amazonaws.com/54.200.117.181:48004 (us-west-2)


# The Database now uses both hosts, because the Enforcer will not shutdown existing process
nuodb [domain] > show database hosts
Database: test
[broker] * ec2-54-200-117-181.us-west-2.compute.amazonaws.com/54.200.117.181:48004 (us-west-2)
[broker] ip-172-31-2-230/54.148.240.227:48004 (us-west-2)
 
nuodb [domain] > show domain summary
 
Hosts:
[broker] * ec2-54-200-117-181.us-west-2.compute.amazonaws.com/54.200.117.181:48004 (us-west-2)
[broker] ip-172-31-2-230/54.148.240.227:48004 (us-west-2)
 
Database: test, (unmanaged), processes [2 TE, 2 SM], ACTIVE
[SM] ip-172-31-5-193/54.200.117.181:48005 (us-west-2) [ pid = 31040 ] [ nodeId = 1 ] RUNNING
[TE] ip-172-31-5-193/54.200.117.181:48006 (us-west-2) [ pid = 31057 ] [ nodeId = 2 ] RUNNING
[SM] ip-172-31-2-230/54.148.240.227:48005 (us-west-2) [ pid = 433 ] [ nodeId = 3 ] RUNNING
[TE] ip-172-31-2-230/54.148.240.227:48006 (us-west-2) [ pid = 460 ] [ nodeId = 4 ] RUNNING
 
# When we restart the database, we will see it come back up with processes just on the new host.
nuodb [domain] > shutdown database test
Timeout (ms/s/m/h/d/w) (optional): 
Remote process shutdown timeout (ms/s/m/h/d/w) (optional): 
Shutdown database test
nuodb [domain] > start database test
nuodb [domain] > show database hosts
Database: test
[broker] ip-172-31-2-230/54.148.240.227:48004 (us-west-2)
 
nuodb [domain] > show domain summary
 
Hosts:
[broker] * ec2-54-200-117-181.us-west-2.compute.amazonaws.com/54.200.117.181:48004 (us-west-2)
[broker] ip-172-31-2-230/54.148.240.227:48004 (us-west-2)
 
Database: test,(unmanaged), processes [1 TE, 1 SM], ACTIVE
[SM] ip-172-31-2-230/54.148.240.227:48005 (us-west-2) [ pid = 491 ] [ nodeId = 1 ] RUNNING
[TE] ip-172-31-2-230/54.148.240.227:48006 (us-west-2) [ pid = 504 ] [ nodeId = 2 ] RUNNING