From a38d8c77c533dfaf502c90b7cb661754cff66ba8 Mon Sep 17 00:00:00 2001 From: nap0o <144927971+nap0o@users.noreply.github.com> Date: Fri, 5 Jan 2024 00:23:14 -0500 Subject: [PATCH] Update backup.sh --- template-paas/backup.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/template-paas/backup.sh b/template-paas/backup.sh index d65d830..3d33ae7 100644 --- a/template-paas/backup.sh +++ b/template-paas/backup.sh @@ -42,9 +42,10 @@ if [[ "${IS_BACKUP}${FORCE_UPDATE}" =~ true ]]; then # 压缩备份数据,只备份 data/ 目录下的 config.yaml 和 sqlite.db; resource/ 目录下名字有 custom 的自定义主题文件夹 if [ -d $WORK_DIR/$GH_REPO ]; then + cd $WORK_DIR TIME=$(date "+%Y-%m-%d-%H:%M:%S") echo "↓↓↓↓↓↓↓↓↓↓ dashboard-$TIME.tar.gz list ↓↓↓↓↓↓↓↓↓↓" - find $WORK_DIR/resource/ -type d -name "*custom*" | tar czvf $WORK_DIR/$GH_REPO/dashboard-$TIME.tar.gz -T- $WORK_DIR/data/ + find resource/ -type d -name "*custom*" | tar czvf $WORK_DIR/$GH_REPO/dashboard-$TIME.tar.gz -T- data/ echo -e "↑↑↑↑↑↑↑↑↑↑ dashboard-$TIME.tar.gz list ↑↑↑↑↑↑↑↑↑↑\n\n" # 更新备份 Github 库,删除 5 天前的备份