Created
June 21, 2015 14:31
-
-
Save gautamkrishnar/1132346d4372d91de255 to your computer and use it in GitHub Desktop.
Backup your website directory (Linux Shell Script) in a folder with foldername as current time in the backup folder
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
d="$(date -d -now)" | |
mkdir backup/"$d" | |
cp -r /var/www/html/* backup/"$d" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Put the script in the folder you need to store backup
First make the backup folder by typing:
mkdir backup
Then execute the script:
bash backup.sh