Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/el-zedy/dump-restore
https://github.com/el-zedy/dump-restore
Last synced: 6 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/el-zedy/dump-restore
- Owner: El-Zedy
- Created: 2023-09-18T06:23:15.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-09-18T06:24:26.000Z (over 1 year ago)
- Last Synced: 2024-11-18T13:39:33.232Z (2 months ago)
- Size: 2.93 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Dump & Restore :tractor:
### Dump Command:
pg_dump --host portals-db-1-0-pg.cmmuo3lde4yu.us-east-1.rds.amazonaws.com(server) --port 5432 --username "master"(user) --schema "practicinglogs"(scheme name) -Fc --blobs --verbose --file "practicinglogs.dump"(databasename.dump) "practicinglogs"(databasename)
##
### Restore Command:
pg_restore --host "portals-db-1-0-pg.cmmuo3lde4yu.us-east-1.rds.amazonaws.com"(server) -U master(user) -d "practicinglogs"(databasename) --schema "practicinglogs_demo"(scheme name) "practicinglogs.dump"(the file created in the step before)
##
### Steps:
1. create databases in target by its name in source
2. users in source should be created in target
3. ssh into databasemanager2 ec2 and securitygroup should have your ip (the user should be ubuntu not root)
4. run the commands