Created
April 10, 2018 03:28
-
-
Save miftahafina/f78475b405eb1edf00bcd5f8b2bf0418 to your computer and use it in GitHub Desktop.
Simple Backup Script
This file contains 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 | |
# Backup htdocs | |
tar -cvzf ~/Backup/Files/htdocs-$(date +%d).tar.gz /opt/lampp/htdocs | |
# Backup database | |
/opt/lampp/bin/mysqldump -u [user] -p[password] --all-databases > ~/Backup/Files/semua_database-$(date +%d).sql | |
// crontab -e | |
// 0 23 * * * sh /home/app/Backup/Script/backup_script.sh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment