Files
motovaultpro/database-exports/schema_20251102_import_instructions.txt
Eric Gullickson a0748ced5b Database Tooling
2025-11-02 09:37:58 -06:00

40 lines
1.5 KiB
Plaintext

===========================================
MotoVaultPro Database Import Instructions
===========================================
Export Details:
- Export Date: Sun Nov 2 09:36:30 CST 2025
- Format: sql
- Compressed: true
- File: /Users/egullickson/Documents/Technology/coding/motovaultpro/database-exports/schema_20251102.sql.gz
Import Instructions:
--------------------
1. Copy the export file to your target server:
scp /Users/egullickson/Documents/Technology/coding/motovaultpro/database-exports/schema_20251102.sql.gz user@server:/path/to/import/
2. Import the database (compressed SQL):
# Using Docker:
gunzip -c /path/to/import/schema_20251102.sql.gz | docker exec -i mvp-postgres psql -U postgres -d motovaultpro
# Direct PostgreSQL:
gunzip -c /path/to/import/schema_20251102.sql.gz | psql -U postgres -d motovaultpro
Notes:
------
- The -c flag drops existing database objects before recreating them
- Ensure the target database exists before importing
- For production imports, always test on a staging environment first
- Consider creating a backup of the target database before importing
Create target database:
-----------------------
docker exec -i mvp-postgres psql -U postgres -c "CREATE DATABASE motovaultpro;"
Or if database exists and you want to start fresh:
--------------------------------------------------
docker exec -i mvp-postgres psql -U postgres -c "DROP DATABASE IF EXISTS motovaultpro;"
docker exec -i mvp-postgres psql -U postgres -c "CREATE DATABASE motovaultpro;"