Posts

Showing posts with the label automation

Scheduling VMWare virtual machines backup with Veeam Backup Free v9 and PowerShell

The Veeam Backup Free v9 is quite good but it lacks of scheduling the backup task. Fortunately, it supports powershell so you can leverage this following script to backup vms without upgrading to the Pro version: 1. Download and Install Veeam Backup & Replication Free v9 in a Windows machine (It's Windows Server 2008 R2 in my case): https://www.veeam.com/virtual-machine-backup-solution-free.html Note that It may require you to install Microsoft .NET framework 4.5.2 and Microsoft SQL Server 2012 Express if your server does not have them. 2. Install PowerShell v3, it's Windows Management Framework 3.0 (the script works best with PowerShell v3): https://www.microsoft.com/en-us/download/details.aspx?id=34595 for Windows Server 2008 R2, I installed the  Windows6.1-KB2506143-x64.msu package. 3. Download this file and edit it with your own information (server name, email settings...) 4. Create a schedule task to run the script every weekend at 1AM for example. ...

Apply DNS to all the Linux servers (minions) using SaltStack

Okey, let's say you want to change nameserver preferences of about 25 Linux servers. You can do it one by one or take a breath and try SaltStack. 1. In your salt master, create a folder name dns ( /srv/salt/dns ) 2. In /srv/salt/dns/ create: * init.sls : /etc/resolv.conf:   file.managed:     - source: salt://dns/resolv.conf     - user: root     - group: root     - mode: 644     - template: jinja /etc/resolvconf/resolv.conf.d/original:   file.managed:     - source: salt://dns/original     - user: root     - group: root     - mode: 644     - template: jinja * resolv.conf : # Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8) #     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN nameserver my.dns.server1 nameserver my.dns.server2 search my.domain.com * original : search my.domain.com nameserver...