remove special character in foler name for crontab autobackup mongodb

This commit is contained in:
chiu 2020-03-10 17:11:41 +08:00
parent 235d2edbf1
commit 49263f0d40
1 changed files with 2 additions and 2 deletions

View File

@ -121,8 +121,8 @@ $ # Login the new create site with rulingcom account and choose “Admin Area”
```sh ```sh
$ sudo crontab -e $ sudo crontab -e
# 內容如下: # 內容如下:
# 0 3 * * * mongodump -o /home/backup/db/`date "+\%Y\%m\%d"`_db # 0 3 * * * mongodump -o /home/backup/db/`date "+%Y%m%d"`_db
# 0 4 * * * rm -fr /home/backup/db/`date --date="1 week ago" "+\%Y\%m\%d"`_db # 0 4 * * * rm -fr /home/backup/db/`date --date="1 week ago" "+%Y%m%d"`_db
``` ```
### 二、R4.5 網站目錄備份 ### 二、R4.5 網站目錄備份