mirror of
git://git.yoctoproject.org/layerindex-web.git
synced 2025-07-05 13:14:46 +02:00
README: add basic documentation on db backup and restore
Make it a bit easier for the user to back up and restore the database. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
This commit is contained in:
parent
a549f6f393
commit
0c3cd99f6b
17
README
17
README
|
@ -405,6 +405,22 @@ REGISTRATION_OPEN = False
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Backup and restore
|
||||||
|
------------------
|
||||||
|
|
||||||
|
To back up the database within the docker-based setup, you can run the
|
||||||
|
following command (no need to substitute ${MYSQL_ROOT_PASSWORD}, it's
|
||||||
|
already present within the container environment):
|
||||||
|
|
||||||
|
docker-compose exec layersdb /bin/sh -c '/usr/bin/mysqldump -u root --password=${MYSQL_ROOT_PASSWORD} layersdb' | gzip > backup-`date +%Y_%m_%d_%H%M`.sql.gz
|
||||||
|
|
||||||
|
To restore one of these backups you would run the following command (take
|
||||||
|
care, this will overwrite the data immediately without prompting!):
|
||||||
|
|
||||||
|
zcat backupfile.sql.gz | docker-compose exec -T layersdb /bin/sh -c '/usr/bin/mysql -u root --password=${MYSQL_ROOT_PASSWORD} layersdb'
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Maintenance
|
Maintenance
|
||||||
-----------
|
-----------
|
||||||
|
|
||||||
|
@ -418,6 +434,7 @@ Contributions are welcome. Please send patches / pull requests to
|
||||||
yocto@yoctoproject.org with '[layerindex-web]' in the subject.
|
yocto@yoctoproject.org with '[layerindex-web]' in the subject.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
License
|
License
|
||||||
-------
|
-------
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user