database migration from sqlite to postgres

Signed-off-by: philippe lhardy <philippe.lhardy@astrolabe.coop>
This commit is contained in:
2025-08-18 09:46:24 +02:00
parent 7408912bd5
commit b7db03be76
5 changed files with 82 additions and 5 deletions

View 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"