Update Restore instance with backup authored by Daniel Palomar's avatar Daniel Palomar
1. Copy the backup in to the server.
2. Modify the `docker-compose.yml` file to add the backup instead the `import-postgres.sql` file:
2. Stop the OpenCell container:
```bash
...
#- /home/opencell/input-files/import-postgres.sql:/docker-entrypoint-initdb.d/import-postgres.sql
- /home/opencell/opencell_12-09-19.sql:/docker-entrypoint-initdb.d/opencell_test.sql
...
```
$ docker stop opencell
```
3. Drop the OpenCell database:
```
$ docker exec -ti postgres dropdb -U opencell opencell
```
3. Done!
4. Create the new OpenCell db:
> Be sure that your `$PG_DATA` folder was removed. Normally in `/home/opencell/postgresql/data/`
\ No newline at end of file
```
$ docker exec -ti postgres createdb -U opencell opencell
```
5. Restore the dump in the new db:
```
$ cat <DUMP_FILE> | docker exec -i postgres psql -U opencell opencell
```
\ No newline at end of file