hijnu commited on
Commit
c6b42b1
·
verified ·
1 Parent(s): 7eb48da

Update backup.sh

Browse files
Files changed (1) hide show
  1. backup.sh +1 -12
backup.sh CHANGED
@@ -8,18 +8,7 @@ pg_dump -U "$DB_POSTGRESDB_USER" -d "$DB_POSTGRESDB_DATABASE" -F c -b -v -f "${W
8
 
9
  # 检查备份是否成功
10
  if [ $? -eq 0 ]; then
11
- echo "数据库备份成功,正在上传到 WebDAV..."
12
-
13
- # 使用 curl 将备份文件上传到 WebDAV,使用基本身份验证
14
- curl -T "${WORKDIR}/backups/backup.dump" \
15
- --user "${WEBDAV_USER}:${WEBDAV_PASSWORD}" \
16
- "${WEBDAV_URL}/backup.dump"
17
-
18
- if [ $? -eq 0 ]; then
19
- echo "备份文件成功上传到 WebDAV"
20
- else
21
- echo "备份文件上传到 WebDAV 失败"
22
- fi
23
  else
24
  echo "数据库备份失败"
25
  fi
 
8
 
9
  # 检查备份是否成功
10
  if [ $? -eq 0 ]; then
11
+ echo "数据库备份成功"
 
 
 
 
 
 
 
 
 
 
 
12
  else
13
  echo "数据库备份失败"
14
  fi