By default Windows setups task priority in scheduler to 7 (which is kinda low). The side effect of this is that for eg. backups are taking very long to take. In my case all databases were backed up in about 40-50 minutes…
Simplest solution for backing up PostgreSQL databases. With this bat file you can dump one database to a file and compress it using 7-zip.
PS. If you want a date in your filename simply add %date% var to it’s string.
PS2. Of course check your paths before complaining it does not work 😛
:: Global config
SET PG_BIN="C:\Program Files\PostgreSQL\9.6\bin\pg_dump.exe"
SET ZIP_BIN="C:\Program Files\7-Zip\7z.exe"
:: Database config for
%PG_BIN% -h %PG_HOST% -p %PG_PORT% -U %PG_USER% %PG_DATABASE% > "%PG_FILENAME%"
%ZIP_BIN% a "%PG_FILENAME:~0,-4%.zip" "%PG_FILENAME%" &DEL "%PG_FILENAME%"
@echo Backup Taken Complete %PG_PATH%%PG_FILENAME%
If you’re a fan of Firefox (mainly because it’s an awesome tool for webdevelopment) like me. You should already know that there’s an additional console for developers (I’ve did not until five minutes ago). When you press Shift + F2 it shows little input bar on the bottom of the window. For example type the following command :
screenshot --clipboard --fullpage
Press Enter and BANG! Screenshot of a entire page in your MEMORY!
Mother of God… This is so awesome!
PS. Try different commands, you can use Tab for completion and help to list them all.