Skip to content

Instantly share code, notes, and snippets.

View mkomputes's full-sized avatar

mkomputes mkomputes

  • Portland, OR USA
View GitHub Profile
@stil
stil / backup.ps1
Created March 2, 2014 00:35
Differential backup with 7zip and Powershell
# CONFIGURATION
$dirToBackup = "C:\Users\John" # path to directory we back up (no following backslash)
$outputDir = "E:\bak" # path directory we store our backups (no following backslash)
$params = '-t7z', '-r', '-ms=off', '-mx1'
# THE SCRIPT
$fullBackup = $outputDir + "\full.7z"
if (Test-Path ($fullBackup)) { # Let's check whether full backup exists
Write-Host "Full backup already exists"