forked from ryanoasis/public-bash-scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbackup-all-databases.bat
More file actions
executable file
·43 lines (27 loc) · 856 Bytes
/
backup-all-databases.bat
File metadata and controls
executable file
·43 lines (27 loc) · 856 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
@echo off
:: Use cygwin bash to execute a bash script from batch file
:: Backups latest keyword_objects database
setLocal EnableDelayedExpansion
title Backing up ALL databases
echo "Enter post fix name for archive (enter for none):"
set /p postfix=
:menu
echo 1 for 7Zip (does not work)
echo 2 for Gzip
set /p pr=
if %pr% == 1 goto 7zip
if %pr% == 2 goto Gzip
if %pr% neq 2 if %pr% neq 1 goto menu
:gzip
echo Archiving with Gzip
c:\Development\Cygwin\bin\bash.exe -l -c "/cygdrive/c/Users/Ryan/public-bash-scripts/backup-all-databases.sh %postfix%"
goto done
:7zip
echo Archiving with 7zip
c:\Development\Cygwin\bin\bash.exe -l -c "/cygdrive/c/Users/Ryan/public-bash-scripts/backup-all-databases-7zip.sh"
goto done
:done
echo Archive complete
pause
:: sources
:: http://www.computing.net/answers/programming/user-choice-in-batch/17003.html