1
0
mirror of https://github.com/vimagick/dockerfiles.git synced 2024-12-25 02:04:06 +02:00

add backup.sh for nextcloud

This commit is contained in:
kev 2018-02-10 13:46:03 +08:00
parent fdd9f013cb
commit beeccceb41

19
nextcloud/backup.sh Executable file
View File

@ -0,0 +1,19 @@
#!/bin/bash
#
# backup userdata to aliyun oss cloud storage
# (please run it as cron job)
#
# https://help.aliyun.com/document_detail/50452.html
#
FILES=/root/fig/nextcloud/data/data
USERS=(admin kev)
export PATH=/usr/local/bin:$PATH
cd $FILES || exit
for user in ${USERS[@]}
do
ossutil cp -r -u $user oss://easypi/nextcloud/$user
done