Hitachi Energy
Local Backup via Command Line
The “edbbackup” command is very simple to use. If the FOXMAN‑UN configuration file
/opt/nem/etc/database.conf
has been edited to contain the appropriate value for the “local_backup_device”, then the database can be backed up simply by entering the command:
 
edbbackup
 
The output should look similar to the following:
 
Starting 'NEM Database Backup'
==============================
 
Backing up NEM user list : Performed
Backing up BP database 'NEM_DATABASE' : Performed
Backing up PM database 'PM_DATABASE' : Performed
Backing up additional files : Performed
Backing up alarms file(s) : Performed
Backing up ENP files : Performed
Backing up PM quickmonitoring files : Performed
Backing up DIRAC database : Performed
Creating backup header file : Performed
Creating backup identifier file : Performed
Packing backup data : Performed
 
The 'NEM Database Backup' has completed successfully.
 
The edbbackup command has the following options:
 
[nemadmin@nemsrv ~]$ edbbackup --help
 
Usage: edbbackup [OPTION]
 
Options:
 
-b,
--backup=FILENAME
Backup device name. This parameter is optional.
The default value first is defined by the variable 'local_backup_device' of the 'database.conf' file. If variable is set as 'UNDEFINED' then we use default name 'nembackup_<CURRENT_DATE_TIME>.bck'
-d,
--database=DB_NAME
Database name. This parameter is optional.
The default value is defined by the variable 'database' of the 'database.conf' file.
-n,
--skip-additional-files
Skip all 'additional' files in backup. Only the database and the file: alarms.txt is backed up.
-w,
--no-progress-cursor
Without progress cursor. This parameter is optional.
The default behavior is with progress cursor.
-t,
--timestamp
With timestamp
The default behavior is without timestamp
-e,
--run-hook-explicit
Run pre/post execution hook script(s) explicitly.
This parameter is optional. (see also database.conf, edbbackup_hook_uncond)
-a,
--with-alarm-history-files
With alarm history file(s)
The default behavior is without alarm history file(s)
-x,
--with-influxdb
With influxDB backup
The default behavior is without influxDB backup
-r,
--encrypt
The output file is encrypted and protected by password.
-p,
--password=PASSWORD
Pass 'password' directly in command line instead of prompt. works only with '-r' option.
-f,
--force-overwrite
Forces to overwrite already existing backup file.
-s,
--skip-esws
Skip rows related to ESWs from table 'dbdata' during backup of BP Database. This parameter is optional.
This option requires NEM to be stopped.
-h,
--help
Print this message.
Examples: edbbackup -b /dev/rmt/0mnb -d NEM_DATABASE
edbbackup -b /local/nem/nemdatabase.bck -d NEM_DATABASE
edbbackup -b nemdatabase.bak -d NEM_DATABASE -r
edbbackup -b nemdatabase.bak -d NEM_DATABASE -r -p veryhardpassword
* 
Please note: 
To store the backup files on a remote server, you can use hookscripts. Please refer to /opt/nem/etc/database.conf file for hookscripts related parameters to configure.