Les Partages de Memiks
Tag cloud
Picture wall
Daily
RSS Feed
  • RSS Feed
  • Daily Feed
  • Weekly Feed
  • Monthly Feed
Filters

Links per page

  • 20 links
  • 50 links
  • 100 links

Filters

Untagged links
Add support for VSS (windows) · Issue #340 · restic/restic · GitHub https://github.com/restic/restic/issues/340
Mon May 7 14:28:17 2018 archive.org
QRCode
thumbnail

To more easily integrate restic with automatic VSS creation I wrote a Windows PowerShell script that can be run to automate this without the complications mentioned above. It is available in the attached zip:
restic-backup-windows-vss.zip

If restic has a repository for external scripts but perhaps it could be included there.

The meat of the script is in these lines excerpted from the script (omitting the config part):

$ShadowPath = $rootVolume + 'shadowcopy\'

Create a volume shadow copy and make it accessible

$s1 = (Get-WmiObject -List Win32_ShadowCopy).Create($rootVolume, "ClientAccessible")
$s2 = Get-WmiObject Win32ShadowCopy | Where-Object { $.ID -eq $s1.ShadowID }
$device = $s2.DeviceObject + "\"

Create a symbolic link to the shadow copy

cmd /c mklink /d $ShadowPath "$device"

Run Restic on the data files in the shadowcopy

ForEach ($folderToBackup in $foldersToBackup) {
cmd /c $resticExe backup -r $resticRepository ($ShadowPath + $folderToBackup)
}

Delete the shadow copy and remove the symbolic link

$s2.Delete()
cmd /c rmdir $ShadowPath

restic windows backup
4756 links, including 1670 private
Shaarli - The personal, minimalist, super-fast, database free, bookmarking service by the Shaarli community - Theme by kalvn