Thanks a lot for your reply! The LAVA link you sent seems pretty outdated, and I don't think it can be applied as-is to docker-compose solution. It is for a host install on Debian (not Docker). More recent documentation seems to be here: https://lava.readthedocs.io/en/latest/admin/basic-tutorials/instance/backup/ However it tells how to create a .sql backup file (which I have), not how to restore it.
About the postgres link you sent, it is for postgres running on host, not within docker I think. For Docker, it is described in https://registry.hub.docker.com/_/postgres/ (chapter "Initialization scripts"). But then when I try to place my .sql file in /docker-entrypoint-initdb.d/ folder, I get the error mentioned in my email: database "lavaserver" already exists.
Thus my question: what procedure is followed by Linaro for the backup/restore of their docker-compose instances?
Thanks again,
Philippe
From: Lava-users lava-users-bounces@lists.lavasoftware.org On Behalf Of koti Sent: Friday, March 19, 2021 2:15 PM To: lava-users@lists.lavasoftware.org Subject: [Lava-users] LAVA master backup/restore
Hi Philippe Mazet,
Please find my comments inline.
Questions: - Does Linaro's docker-compose solution modify postgres restore mechanism in any way? [Koti] --> I am not sure about this. - How do you handle backup/restore at linaro? [Koti] ----> still are you facing the backup/restore issue after following the below documentation? 1. https://docs.lavasoftware.org/lava/admin-backups.html 2. http://postgresguide.com/utilities/backup-restore.html Regards, Koti
On Fri, 19 Mar 2021 at 17:30, mailto:lava-users-request@lists.lavasoftware.org wrote: Send Lava-users mailing list submissions to lava-users@lists.lavasoftware.org
To subscribe or unsubscribe via the World Wide Web, visit https://lists.lavasoftware.org/mailman/listinfo/lava-users or, via email, send a message with subject or body 'help' to lava-users-request@lists.lavasoftware.org
You can reach the person managing the list at lava-users-owner@lists.lavasoftware.org
When replying, please edit your Subject line so it is more specific than "Re: Contents of Lava-users digest..."
Today's Topics:
1. LAVA master backup/restore (Philippe Mazet (OSS))
----------------------------------------------------------------------
Message: 1 Date: Thu, 18 Mar 2021 15:22:20 +0000 From: "Philippe Mazet (OSS)" mailto:philippe.mazet@oss.nxp.com To: "mailto:lava-users@lists.lavasoftware.org" mailto:lava-users@lavasoftware.org Subject: [Lava-users] LAVA master backup/restore Message-ID: PR3PR04MB7244B9C1456CAD918574F1218B699@PR3PR04MB7244.eurprd04.prod.outlook.com
Content-Type: text/plain; charset="us-ascii"
Hi all,
I am using the docker-compose solution to run a master: https://git.lavasoftware.org/lava/pkg/docker-compose I was wondering how to extract a backup of the DB, and re-inject it in a different instance.
I found that postgres image has its own "restore" mechanism, based on initdb.d folder, as mentioned in the documentation: https://registry.hub.docker.com/_/postgres/
The entrypoint.sh script (https://github.com/docker-library/postgres/blob/master/docker-entrypoint.sh) handles the restore whenever the folder is /docker-entrypoint-initdb.d/ contains a .sql file.
But when we store a backup in the container's /docker-entrypoint-initdb.d/ folder, and remove both the postgres image and its db-data volume, we get this error on next start: ERROR: database "lavaserver" already exists Full startup log attached.
Questions: - Does Linaro's docker-compose solution modify postgres restore mechanism in any way? - How do you handle backup/restore at linaro?
Thanks a lot in advance,
Philippe Mazet NXP Semiconductors - Edge Processing Email: philippe.mazet@nxp.com