You can use crones, such as: Automatically back up / TEST directory to / backup to / backup, compressed, compressed file names, depending on the current backup time, can: 1. Write backup.sh scripts according to the current backup time : #! / Bin / shtar CZF /BACKUP/Test. $ (Date % Y-% M-% D-% H-% M-% s) .TGZ / TESTEXIT $? This script packs the catalog to compress the form, such as: Test.
2005-01-01
-00-00-00.tgz, you can also run the Man Date command, replace % Y-% M-% D-% H-% M-% S into the way you want. 2. Run crontab -e, plus: 0 0 * * * /Root/backup.sh Specifies run /root/backup.sh every day 00:00, is the storage location of the script above. You can view the help of crones and modify the time period running.
Similarly, you can automatically back up the database, such as Oracle's backup: #! / Bin / shexport Oracle_Home = / Oracle / Product /
10g
Export Oracle_sid = ORC1 / USR / LOCAL / ORACLE / PRODUCT /
10g
/ bin / express user / password file = / home / oracle / oracle_backup. $ (DATE % Y-% M-% D-% H-% M-% s) .dmpexit $?