1
0
mirror of https://github.com/vimagick/dockerfiles.git synced 2024-11-24 08:52:31 +02:00
dockerfiles/nextcloud/backup.sh
2018-02-10 13:48:20 +08:00

20 lines
351 B
Bash
Executable File

#!/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