1
0
mirror of https://github.com/vimagick/dockerfiles.git synced 2024-11-30 09:16:58 +02:00
dockerfiles/nextcloud/backup.sh

20 lines
351 B
Bash
Raw Normal View History

2018-02-10 07:46:03 +02:00
#!/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