The timing of the backup file shell script

The timing of the backup file shell script

#!/bin/bash
tar -zcf  /var/backup/etc_backup`date  +20%y-%m-%d`.tar.gz  /etc

-E to edit a scheduled task # Crontab-
0 1 * /root/file_backup.sh day 1:00 execution / etc backup tasks


Note: You need exist in advance / var / backup directory

Guess you like

Origin blog.51cto.com/11342825/2423033