Update README.md
This commit is contained in:
parent
19d7fa6ee1
commit
5dd37635dc
20
README.md
20
README.md
|
@ -120,13 +120,29 @@ $ sudo service nginx restart
|
||||||
$ # Login the new create site with rulingcom account and choose “Admin Area” to complete the registration of this new created site.
|
$ # Login the new create site with rulingcom account and choose “Admin Area” to complete the registration of this new created site.
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## 開啟crontab的log(獨立顯示)
|
||||||
|
###Open the file
|
||||||
|
```sh
|
||||||
|
vim /etc/rsyslog.d/50-default.conf
|
||||||
|
```
|
||||||
|
###Find the line that starts with: #cron.*
|
||||||
|
```sh
|
||||||
|
|
||||||
|
uncomment that line, save the file, and restart rsyslog:
|
||||||
|
|
||||||
|
sudo service rsyslog restart
|
||||||
|
|
||||||
|
You should now see a cron log file here: /var/log/cron.log
|
||||||
|
```
|
||||||
## 設定備份(以備份一週內容為例)
|
## 設定備份(以備份一週內容為例)
|
||||||
### 一、資料庫備份
|
### 一、資料庫備份
|
||||||
```sh
|
```sh
|
||||||
|
#### 安裝postfix,以避免NO MTA installed.
|
||||||
|
sudo apt-get install -y postfix
|
||||||
$ 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 網站目錄備份
|
||||||
|
|
Loading…
Reference in New Issue