20 lines
533 B
Bash
20 lines
533 B
Bash
#!/bin/bash
|
|
set -e
|
|
if [ -z ${php} ]; then
|
|
php="php8.2"
|
|
fi
|
|
source $HOME/scripts/config.env
|
|
|
|
cd $HOME/nextcloud
|
|
$php occ maintenance:mode --on
|
|
|
|
echo "syncing data..."
|
|
rsync -aAX --delete /home/storage/$pac/users/$user/data_clean/ /home/storage/$pac/users/$user/data/
|
|
echo "syncing nextcloud..."
|
|
rsync -aAX --delete /home/pacs/$pac/users/$user/nextcloud_clean/ /home/pacs/$pac/users/$user/nextcloud/
|
|
echo "feeding the dump..."
|
|
pg_restore -c -h localhost -U $dbuser -d $db < $dump
|
|
|
|
$php occ maintenance:mode --off
|
|
echo
|
|
echo done. |