Skip to main content

Posts

Showing posts from May, 2022

How-to convert Windows Server 2019 Evaluation to Windows Server 2019 Standard

 Hi, Recently we have bough a new Dell PowerEdge R640 server for my current company, where we have got Windows 2019 Server ROK key. Since I wanted to use as primary OS Proxmox VE and then virtualize everything I just installed on VM Windows Server 2019 Evaluation Standard on it. After some test with our company software, I was ready to activate the Windows Licence Key on that machine. The Windows activation procedure via GUI cannot use that key, so from the terminal I have done this: C:\Windows\System32\DISM /online /Set-Edition:ServerStandard /ProductKey:XXXXX-XXXXX-XXXXX-XXXXX-XXXXX /AcceptEula  Deployment Image Servicing and Management Tool Version: 10.0.17763.1790 Image Version: 10.0.17763.1790 Starting to update components... Starting to install product key... Finished installing product key. Removing package Microsoft-Windows-ServerStandardEvaluation~31bff3856ad364e35~amd64~~10.0.17763.1 [--------------------------100%---------------------------] Finished updating components. St

PostgreSQL backup script Windows Server 2019

 A few days ago I had to create a backup script for my PostgreSQL server running on Windows. After few minutes the script looks like this: @echo off SET DBHOST=localhost set DBNAME=YOUR_DB_NAME set DBUSER=YOUR_DB_USERNAME set PGPASSWORD=YOUR_DB_PASSWORD :: Path to PostgreSQL pg_dump.exe set PGDUMP="C:\Program Files\PostgreSQL\14\bin\pg_dump.exe" :: Get date in YYYY-MM-DD format set CURRENTDATE=%date:~6,4%%date:~3,2%%date:~0,2% set BACKUPDIR=BACKUP_DIRECTORY %PGDUMP% --host %DBHOST% --port 5432 --format custom --blobs --username %DBUSER% -f "%BACKUPDIR%\%CURRENTDATE%-%DBNAME%.backup" %DBNAME%   And it is working now like a charm :)