Last active
August 29, 2015 14:13
-
-
Save alxsimo/f79b2578a56763ce5b6f to your computer and use it in GitHub Desktop.
[SYS] Backup Scripts
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 | |
# /usr/bin/backup | |
# Backup www folder + database | |
# author: Alexandru Simonescu | |
# | |
a=$(date +%T-%d_%m_%Y) | |
b=$(date +%d_%m_%Y) | |
mkdir /home/webserver_backups/$b/ | |
cp -i -p -R /var/www/museo /home/webserver_backups/$b/museo_$a | |
mysqldump --password=s3cret database_name > /home/webserver_backups/$b/base_de_datos.sql | |
echo "Backup of WWW and DB completed :-)" |
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
REM Simple Windows Backup | |
SET folderdate=%date:~6,4%-%date:~3,2%-%date:~0,2% | |
SET source="C:\xampp" | |
set destiny=C:\backup\ | |
xcopy %source% %destiny%WebServer-%folderdate% /s /i | |
-------- | |
REM PIMA IIS Backup Script | |
SET folderdate=%date:~6,4%-%date:~3,2%-%date:~0,2%_%time:~0,2%-%time:~3,2%-%time:~6,2% | |
SET source="C:\PIMA\Deploys\PIMA" | |
set destiny="C:\PIMA\Deploys\PIMA_BK_SCRIPT\ | |
xcopy %source% %destiny%PIMA_IIS-%folderdate%" /s /i |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment