Last active
August 29, 2015 14:01
-
-
Save lidio601/15961a1b0a0e935053e8 to your computer and use it in GitHub Desktop.
Bash Script to backup or make a snapshot of your website
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 | |
cd "/path/to/your/backup/directory" | |
mysqldump -u "<DATABASE-USER>" -p "<DATABASE-NAME>" >"`date +%Y%m%d`_database.sql" | |
tar czvf "`date +%Y%m%d`_htdocs.tar.gz" "/path/to/your/htdocs/directory" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment