- 07 Jan 2025
- 1 Minute à lire
- SombreLumière
- PDF
Backing up the data store: Embedded MariaDB database (without password prompt for batch files)
- Mis à jour le 07 Jan 2025
- 1 Minute à lire
- SombreLumière
- PDF
The mysqldump command may also be run via a batch file to automatically create backups at regular intervals. To remove the interactive prompt for the password, you can create an option file to provide the required credentials in a more secure way than via the command line.
After you create an SQL dump, the dump file will contain unencrypted data which is sensitive in the context of GDPR. To be GDPR-compliant, we recommend to either delete the file, or to encrypt the file, folder, or disk containing this sensitive information.
For more information about GDPR, refer to the OneSpan Authentication Server General Data Protection Regulation Compliance Guide.
To create a logical backup of the embedded MariaDB database (w/o password prompt)
Create an option file with the following content:
[mysqldump]
host = localhost
user = db_username
password = db_password
where:
- db_username is the user account used for database authentication.
- db_password is the password used for database authentication.
As you need to store the password in plain text, you should protect the option file from unauthorized access!
Use the following command line:
mysqldump ‑v ‑‑defaults‑extra‑file=option_filedb_name > backup_filename
where:
- option_file is the full path and name of the option file.
- db_name is the database name, e.g. Identikey Server.
- backup_filename is the absolute path and name of the file to store the data backup, e.g. ./backup.sql.
You can create a second database administrator account that only has permission to back up the database.