Skip to main content

Backup Installation

The LogicalDOC Backup needs to be installed in the same server that is running your LogicalDOC.

Download and launch the installation package for your system from the download website.

During the setup you will be prompted to provide the folder where your LogicalDOC is installed in and the target folder that will receive the backup packages.

Configuration

The installer configures the backup tool with common settings, but you can change them at any time by editing the configuration file located at <Backup_Home>/conf/context.properties:

ParameterDescription
logicaldoc.homeFull path of LogicalDOC installation directory 
backup.targetdirFull path of the directory that will receive the backup files 
db.usernameThe username to connect to the database
db.passwordThe password to connect to the database
db.host

Hostname or IP address of the database. Default value: localhost

db.port

Database port. Default value: 3306 for MySQL, 5342 for PostgreSQL

db.name

Database name. Default value: logicaldoc

backup.db.dirAbsolute path of the temporary folder that will receive the database dumps
backup.db.command

Full path of the database dump command. Default value: mysqldump for MySQL, pg_dump for PostgreSQL

backup.db.arguments

Arguments to pass to the dump command.

Default value for MySQL: -h ${db.host} -P ${db.port] -u ${db.username} -p${db.password} ${db.name}

Default value for PostgreSQL: -h ${db.host} -p ${db.port} -U ${db.username} -d ${db.name}

backup.db.data.command

Full path of the database command to extract the data. Default value: mysqldump for MySQL, pg_dump for PostgreSQL

backup.db.data.arguments

Arguments to pass to the data dump command.

Default value for MySQL: -h ${db.host} -P ${db.port} -u ${db.username} -p"${db.password}" --tab ${backup.db.dir} ${db.name}

Default value for PostgreSQL: -h ${db.host} -p ${db.port} -U ${db.username} -d ${db.name}

restore.db.commandFull path of the database restore command. Default value: mysql for MySQL, psql for PostgreSQL
restore.db.arguments

Arguments to pass to the restore command.

Default value for MySQL: -h ${db.host} -P ${db.port] -u ${db.username} -p${db.password} ${db.name} 

Default value for PostgreSQL: -h ${db.host} -p ${db.port} -U ${db.username} -d ${db.name}

restore.db.data.command

Full path of the database command to restore the data. Default value: mysqlimport for MySQL, psql for PostgreSQL

restore.db.data.command

Full path of the database command to restore the data. Default value: mysqlimport for MySQL, psql for PostgreSQL

restore.db.data.arguments

Arguments to pass to the data restore command.

Default value for MySQL: -h ${db.host} -P ${db.port} -u ${db.username} -p"${db.password}" -i --ignore-foreign-keys=true --use-threads=4 ${db.name} 

Default value for PostgreSQL: -h ${db.host} -p ${db.port} -U ${db.username} -d ${db.name}

restore.db.data.arguments

Arguments to pass to the data restore command.

Default value for MySQL: -h ${db.host} -P ${db.port} -u ${db.username} -p"${db.password}" -i --ignore-foreign-keys=true --use-threads=4 ${db.name} 

Default value for PostgreSQL: -h ${db.host} -p ${db.port} -U ${db.username} -d ${db.name}

MySQL Secure File Priv

The LogicalDOC Backup must export your data into the temporary folder configured in the setting backup.db.dir, but if you are using MySQL or MariaDB, there is the configuration variable secure-file-priv used to limit the effect of data import and export operations. These operations are permitted only to users who have the FILE privilege on the specified path. 

In order to make the LogicalDOC Backup able to extract your data, please uncomment the variable secure-file-priv in your my.ini or my.cnf configuration file and set it to empty string or to the same path specified in the backup.db.dir:

secure-file-priv = ""

-- or --

secure-file-priv = "same path of backup.db.dir"

Log of the application

The backup tool sends its output to the console. It also creates execution log files in the logs folder. Inside this folder, the system will write the log of the backup activities. A new log file will be generated each time the backup command is executed.