From beeccceb41cc1315ee12a28e6e7caed65f66ef39 Mon Sep 17 00:00:00 2001 From: kev Date: Sat, 10 Feb 2018 13:46:03 +0800 Subject: [PATCH] add backup.sh for nextcloud --- nextcloud/backup.sh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100755 nextcloud/backup.sh diff --git a/nextcloud/backup.sh b/nextcloud/backup.sh new file mode 100755 index 0000000..6b2611f --- /dev/null +++ b/nextcloud/backup.sh @@ -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