Difference between revisions of "SQL database"
From aquarium-doc
Jump to navigationJump to search
| Line 20: | Line 20: | ||
== Backup == | == Backup == | ||
Manual backup works as following: | Manual backup works as following: | ||
* Export of database with <code>sudo mysqldump -u root aquarium > name_of_backup.sql | * Export of database with <code>sudo mysqldump -u root aquarium > name_of_backup.sql</code> | ||
* Transfer of data to alternative storage | * Transfer of data to alternative storage | ||
* Restoring data from backup works with <code>mysql aquarium < name_of_backup.sql | * Restoring data from backup works with <code>mysql aquarium < name_of_backup.sql</code> | ||
* keep in mind to create user "aquarium" with matching password when restoring on a new device | * keep in mind to create user "aquarium" with matching password when restoring on a new device | ||
== Heading text == | == Heading text == | ||
The database contains the following tables: | The database contains the following tables: | ||
Revision as of 14:05, 24 March 2023
Aquarium Control uses MariaDB.
Installation
Use the following commands to install MariaDB:
sudo apt-get update
sudo apt-get upgrade
sudo apt install mariadb-server
sudo apt-get install libmariadb-dev
sudo apt-get install libmariadb-dev-compat
sudo apt-get install libgsl-dev
The commands are also inside the libinstall script inside the repository of aquarium-ctrl.
Backup
Manual backup works as following:
- Export of database with
sudo mysqldump -u root aquarium > name_of_backup.sql - Transfer of data to alternative storage
- Restoring data from backup works with
mysql aquarium < name_of_backup.sql - keep in mind to create user "aquarium" with matching password when restoring on a new device
Heading text
The database contains the following tables: