Monday, 26 September 2011

HOW TO: Install Ylastic CostAgent on Windows

Although one can simply schedule the Ylastic CostAgent as a task on Ylastic itself ( see Can Ylastic host the cost agent for me? ) I decided I didn't want to do this as it involves giving Ylastic the master account username and password for each of our AWS accounts. Although we probably trust Ylastic this is not best practice. Therefore I decided to install the CostAgent on my work station (I'll move it to a server later) and schedule it. I quickly discovered that the main documentation only covered installation on Linux, didn't find anything else out  there hence this post.

Tuesday, 13 September 2011

Checkpoint SmartCenter Server Backup Automation Script

Today I finally got around to figuring out how to automate the backup of a Checkpoint SmartCenter Server. 

The following batch file can be run as a schedule task. It generates a backup file with a name composed of the current date and time hence not overwriting previous backups. Note the undocumented "-n" option that makes upgrade_export.exe run completely silently.

This can be further extended to move the backup file off the server once complete. FTP it off or upload it to an Amazon S3 bucket.

@echo off
set "filename=%TIME%_%DATE%"
rem echo.%filename%
set "filename=%filename:/=%"
set "filename=%filename::=%"
set "filename=%filename:.=%"
set "filename=%filename: =%" 
set "filename=c:\<some_folder>\%filename%.bak"
rem echo.%filename%

call C:\WINDOWS\FW1\R65\fw1\bin\upgrade_tools\upgrade_export.exe -n %filename%