Created
December 4, 2019 04:43
-
-
Save AgungPambudi/946dfb577acb570d29ad2ddee2e8defb to your computer and use it in GitHub Desktop.
bash script to backup list cronjob (Linux)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#title : cron_backup.sh | |
#description : bash script to backup list cronjob (Linux). | |
#author : Agung Pambudi | |
#website : http://agungpambudi.com | |
#email : [email protected] | |
#version : 0.1 | |
#============================================================================== | |
# | |
# _ _ _ | |
# ___ ___ _ _ ___ ___ ___ ___ _____| |_ _ _ _| |_| ___ ___ _____ | |
#| .'| . | | | | . | . | .'| | . | | | . | |_| _| . | | | |
#|__,|_ |___|_|_|_ | _|__,|_|_|_|___|___|___|_|_|___|___|_|_|_| | |
# |___| |___|_| | |
now=$(date +"%Y_%m_%d_%H_%M_%S") | |
mkdir -p /home/agungpambudi/cronjob/$now && | |
crontab -l > /home/agungpambudi/cronjob/$now/cronjob.backup | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment