Skip to content

Instantly share code, notes, and snippets.

@akeinhell
Created December 31, 2015 02:13
Show Gist options
  • Save akeinhell/763617fae52fdacfec48 to your computer and use it in GitHub Desktop.
Save akeinhell/763617fae52fdacfec48 to your computer and use it in GitHub Desktop.
Созданеие бекапа
set PATH=%PATH%;%ProgramFiles(x86)%\PostgreSQL\9.1.9-1.1C\bin;%ProgramFiles%\7-Zip
echo %PATH%
set DAT=%date:~6,4%%date:~3,2%%date:~0,2%
cd C:\backup
pg_dump -U postgres unf14 > %DAT%-unf14.pgsql.backup
7z a -tzip %DAT%-unf14.pgsql.zip %DAT%-unf14.pgsql.backup
del %DAT%-unf14.pgsql.backup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment