Changes
Page history
Update Restore instance with backup
authored
Jul 06, 2020
by
Daniel Palomar
Show whitespace changes
Inline
Side-by-side
Restore-instance-with-backup.md
View page @
d0e9d6f2
...
...
@@ -96,15 +96,25 @@ $ docker exec -ti postgres createdb -U opencell opencell
4.
Restore the dump in the new DB. Inside the snapshot, we can find a dump of OpenCell, a dump of Keycloak and the OC filesystem with all the printed invoices:
```
# Estructura interna del snapshot
/opt/backup/.tmp/pg_dump_opencell.sql
/opt/backup/.tmp/pg_dump_keycloak.sql
/home/opencell/input-files/opencell-version.txt
/home/opencell/input-files/opencell-admin.properties
/home/opencell/opencelldata
```
```
$ cat <DUMP_FILE> | docker exec -i postgres psql -U opencell opencell
$ cat <snapshot-path>/opt/backup/.tmp/pg_dump_opencell.sql | docker exec -i postgres psql -U opencell opencell
$ cat <snapshot-path>/opt/backup/.tmp/pg_dump_keycloak.sql | docker exec -i postgres psql -U opencell keycloak
```
5.
Restore the filesystem from the backup overriding the
`opencelldata`
folder:
```
$ sudo cp
$ sudo cp -r <snapshot-path>/home/opencell/opencelldata /home/opencell/opencelldata
$ sudo chown -R 1000 /home/opencell/opencelldata
```
6.
Up the OC container:
...
...
...
...