Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2024-12-14 02:17:07 +03:00
parent 0b4a7678ea
commit 802923994a
2 changed files with 49 additions and 0 deletions

View File

@ -494,9 +494,19 @@ saveLastRunConfig(){
}
# Set app variables...
#
# webAppConfig NAME
#
#
# This will generate:
# <app>_DOMAIN
# <app>_SUBDOMAIN
# DFL_DOMAIN
#
# This also will unset (to explicitly ask user):
# DOMAIN
#
webAppConfig(){
local name=${1^^}
eval "${name}_SUBDOMAIN=\${${name}_SUBDOMAIN:=\${DFL_SUB${name}_DOMAIN}}

View File

@ -16,6 +16,45 @@ readConfig
#----------------------------------------------------------------------
# backup/restore...
# Backup...
# see:
# https://docs.nextcloud.com/server/latest/admin_manual/maintenance/backup.html
if [ $1 == 'backup' ] ; then
# XXX maintenance mode:
# turnkey-occ maintenance:mode --on
# XXX files:
# rsync -Aavx nextcloud/ nextcloud-dirbkp_`date +"%Y%m%d"`/
# XXX db:
# mysqldump --single-transaction \
# -h [server] -u [username] -p[password] [db_name] \
# > nextcloud-sqlbkp_`date +"%Y%m%d"`.bak
# or:
# mysqldump --single-transaction --default-character-set=utf8mb4 \
# -h [server] -u [username] -p[password] [db_name] \
# > nextcloud-sqlbkp_`date +"%Y%m%d"`.bak
# XXX maintenance mode:
# turnkey-occ maintenance:mode --off
exit
# Restore backup...
# see:
# https://docs.nextcloud.com/server/latest/admin_manual/maintenance/restore.html
elif [ $1 == 'restore' ] ; then
# XXX
exit
# Migrate...
elif [ $1 == 'migrate' ] ; then
# XXX similar to make.sh backup && make.sh restore but copies data directly (rsync)...
# XXX
exit
fi
#----------------------------------------------------------------------
# build...
webAppConfig Nextcloud