database migration from sqlite to postgres
Signed-off-by: philippe lhardy <philippe.lhardy@astrolabe.coop>
This commit is contained in:
24
nextcloud_devenv/migrate_db_sqlite2postgres.sh
Executable file
24
nextcloud_devenv/migrate_db_sqlite2postgres.sh
Executable file
@@ -0,0 +1,24 @@
|
||||
#!/bin/bash
|
||||
|
||||
source lib/metascript.sh
|
||||
|
||||
defaultmetainit $@
|
||||
|
||||
rel_bind_folder=bind_folder
|
||||
bind_folder=$(pwd)/$rel_bind_folder
|
||||
|
||||
$defer ./get_dbcontent.sh
|
||||
|
||||
# $defer ./setupdatabase.sh
|
||||
|
||||
log_info "See https://docs.nextcloud.com/server/latest/admin_manual/configuration_database/db_conversion.html"
|
||||
|
||||
source ./config_db_query.sh
|
||||
|
||||
# convert localhost of host into container virtual brdige hostname mapping
|
||||
#db_hostname=host.docker.internal
|
||||
#db_hostname=host.containers.internal
|
||||
# host loopback mapped address
|
||||
db_hostname=10.1.1.13
|
||||
|
||||
$defer ./run_occ.sh db:convert-type --password="$password" --port="$db_port" --all-apps pgsql "$username" "$db_hostname" "$database_name"
|
||||
Reference in New Issue
Block a user