database migration from sqlite to postgres
Signed-off-by: philippe lhardy <philippe.lhardy@astrolabe.coop>
This commit is contained in:
@@ -7,7 +7,29 @@ bind_folder=$(pwd)/$rel_bind_folder
|
||||
|
||||
timestamp=$(get_timestamp_second)
|
||||
|
||||
database_file=/data/owncloud.db
|
||||
database_dest=nextcloud.${timestamp}.db
|
||||
$defer sudo cp ${bind_folder}${database_file} ${database_dest}
|
||||
$defer sudo chown $(id -u):$(id -g) ${database_dest}
|
||||
getsqlite()
|
||||
{
|
||||
database_file=/data/owncloud.db
|
||||
database_dest=nextcloud.${timestamp}.db
|
||||
$defer sudo cp ${bind_folder}${database_file} ${database_dest}
|
||||
$defer sudo chown $(id -u):$(id -g) ${database_dest}
|
||||
}
|
||||
|
||||
getmysql()
|
||||
{
|
||||
BACKUP_FILE=nextcloud.${timestamp}.mysql
|
||||
database_dest=nextcloud.${timestamp}.db
|
||||
ssh ${SSH_URL} 'mysqldump -u adminmyweb -p nextcloud --single-transaction --quick --lock-tables=false' | cat > ${BACKUP_FILE}
|
||||
}
|
||||
|
||||
getpostgresql()
|
||||
{
|
||||
./backup_sql.sh
|
||||
}
|
||||
|
||||
|
||||
|
||||
log_warn "NO check if sqlite was migrated... so might get unused information"
|
||||
|
||||
getsqlite
|
||||
getpostgresql
|
||||
|
||||
Reference in New Issue
Block a user