-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add instruction how to migrate to crunchydb (#116)
- Loading branch information
1 parent
1b80839
commit 8c0e678
Showing
1 changed file
with
31 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# Migrate to CrunchyDB | ||
|
||
## Create CrunchyDB Cluster | ||
|
||
Create Cluster | ||
|
||
## Migrate metabase database to CrunchyDB | ||
|
||
### Create metabase user under psql prompt | ||
create user ******** password '********'; | ||
create database metabase owner metabaseuser ENCODING 'utf8' LC_COLLATE = 'en_US.utf-8' LC_CTYPE = 'en_US.utf-8'; | ||
CREATE EXTENSION IF NOT EXISTS citext WITH SCHEMA public; | ||
CREATE EXTENSION IF NOT EXISTS set_user WITH SCHEMA public; | ||
|
||
### Dump and restore metabase data | ||
|
||
pg_dump -f matabase-data.sql -n public -d metabase | ||
psql metabase < ./matabase-data.sql >> ./metabase-restore.log 2>&1 | ||
|
||
## Migrate cthub database to CrunchyDB | ||
|
||
create user ******** password '********'; | ||
create database cthub owner cthubpqaitvng ENCODING 'utf8' LC_COLLATE = 'en_US.utf-8' LC_CTYPE = 'en_US.utf-8'; | ||
CREATE EXTENSION IF NOT EXISTS citext WITH SCHEMA public; | ||
CREATE EXTENSION IF NOT EXISTS set_user WITH SCHEMA public; | ||
|
||
### Dump and restore cthub data | ||
|
||
pg_dump -f cthub-data.sql -n public -d cthub | ||
psql cthub < ./cthub-data.sql >> ./cthub-restore.log 2>&1 | ||
|