Sysadmin > UtilitIes > IpAM > EfficientIP > RestoreBackupOnCLI

Restore backup on the CLI

How to restore a backup on the SOLIDserver via CLI or serial console

% su
# cd /data1/backup/
# ln -s solid-ddi.mgmt.corp.net-20141211-0100.gz to_restore.gz
# /usr/local/nessy2/script/restore_ipm.sh start

Example output of the restore

Stopping ipmdns.
Waiting for PIDS: 1577.
Error: ipmdns_hsm is not enabled
Stopping ipmdhcp.
Waiting for PIDS: 1545.
Stopping ipmserver.
Waiting for PIDS: 1534.
kern.ipc.shmmax: 2147483648 -> 2147483648
kern.ipc.shmall: 2097152 -> 524288
kern.ipc.shm_use_phys: 1 -> 1
pg_ctl: PID file "/data1/data/postmaster.pid" does not exist
Is server running?
The files belonging to this database system will be owned by user "pgsql".
This user must also own the server process.

The database cluster will be initialized with locale C.
The default text search configuration will be set to "english".

fixing permissions on existing directory /data1/data ... ok
creating subdirectories ... ok
selecting default max_connections ... 100
selecting default shared_buffers ... 32MB
creating configuration files ... ok
creating template1 database in /data1/data/base/1 ... ok
initializing pg_authid ... ok
initializing dependencies ... ok
creating system views ... ok
loading system objects' descriptions ... ok
creating collations ... ok
creating conversions ... ok
creating dictionaries ... ok
setting privileges on built-in objects ... ok
creating information schema ... ok
loading PL/pgSQL server-side language ... ok
vacuuming database template1 ... ok
copying template1 to template0 ... ok
copying template1 to postgres ... ok

WARNING: enabling "trust" authentication for local connections
You can change this by editing pg_hba.conf or using the -A option the
next time you run initdb.

Success. You can now start the database server using:

    /usr/local/bin/postgres -D /data1/data
or
    /usr/local/bin/pg_ctl -D /data1/data -l logfile start

CREATE ROLE
setup in directory /data1/etc/unbound
generating unbound_server.key
Generating RSA private key, 1536 bit long modulus
.............................++++
...............................................++++
unable to write 'random state'
e is 65537 (0x10001)
generating unbound_control.key
Generating RSA private key, 1536 bit long modulus
....++++
.............................................................................++++
unable to write 'random state'
e is 65537 (0x10001)
create unbound_server.pem (self signed certificate)
create unbound_control.pem (signed client certificate)
Signature ok
subject=/CN=unbound-control
Getting CA Private Key
unable to write 'random state'
Setup success. Certificates created. Enable in unbound.conf file to use
VACUUM
Stopping sshd.
Waiting for PIDS: 1579.
Performing sanity check on sshd configuration.
Starting sshd.
Shutdown NOW!
shutdown: [pid 51657]

*** FINAL System shutdown message from admin@ddi.mgmt.corp.net ***

System going down IMMEDIATELY

# /usr/local/nessy2/script/restore_ipm.sh /data1/backup/solid-ddi.mgmt.corp.net-20141211-0100.gz
Does not work.