Compare commits

...
1 Commits
Author SHA1 Message Date
athul rd c4baa42b2c aaa 2026-07-28 08:48:22 +05:30
2 changed files with 1650 additions and 0 deletions
+31
View File
@@ -0,0 +1,31 @@
# Database backup
`mv_rent_backup.sql` is a plain-SQL PostgreSQL dump of the `mv_rent` database
(schema + data), created with:
```bash
pg_dump --no-owner --no-privileges --clean --if-exists mv_rent -f db/mv_rent_backup.sql
```
It includes `DROP ... IF EXISTS` before each object, so restoring overwrites the
target database's contents.
> ⚠️ Contains application data: user emails and **bcrypt-hashed** passwords
> (not plaintext). Keep this repository private.
## Restore
**Into a local Postgres:**
```bash
createdb mv_rent 2>/dev/null # if it doesn't exist yet
psql -h localhost -U postgres -d mv_rent -f db/mv_rent_backup.sql
```
**Into the Docker Compose deployment (server or local):**
```bash
cd /opt/mvrent # or your project dir
docker compose exec -T db psql -U postgres -d mv_rent < db/mv_rent_backup.sql
```
Stop the `app` container first if you want a clean restore without it writing
concurrently: `docker compose stop app && …restore… && docker compose start app`.
File diff suppressed because it is too large Load Diff