diff --git a/README b/README index 759bbb2..be6cda7 100644 --- a/README +++ b/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 ----------- @@ -418,6 +434,7 @@ Contributions are welcome. Please send patches / pull requests to yocto@yoctoproject.org with '[layerindex-web]' in the subject. + License -------