Created
February 15, 2017 21:41
-
-
Save rafabarzotto/9ad4b90ccb1139a8b5ea7e2a256de64c to your computer and use it in GitHub Desktop.
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
C:\e-SUS-AB\e-SUS-AB PEC\PostgreSQL\9.3\bin>pg_dump.exe -i -h localhost -p 5433 | |
-U postgres -F c -b -v -f C:\Users\Public\bkp\bkp.backup esus | |
@echo off | |
for /f "tokens=1-4 delims=/ " %%i in ("%date%") do ( | |
set dow=%%i | |
set month=%%j | |
set day=%%k | |
set year=%%l | |
) | |
set datestr=%month%_%day%_%year% | |
echo datestr is %datestr% | |
set BACKUP_FILE=C:\Users\Public\bkp\esus_%datestr%.backup | |
echo backup file name is %BACKUP_FILE% | |
SET PGPASSWORD=esus | |
echo on | |
pg_dump.exe -i -h localhost -p 5433 -U postgres -F c -b -v -f %BACKUP_FILE% esus |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment