Skip to content

Instantly share code, notes, and snippets.

@pschichtel
Created November 29, 2024 01:09
Show Gist options
  • Save pschichtel/e838f74bc14b02ae6deb103ee78d4948 to your computer and use it in GitHub Desktop.
Save pschichtel/e838f74bc14b02ae6deb103ee78d4948 to your computer and use it in GitHub Desktop.
Restic Backups on Windows

Installation

  1. Place the script resticbackup.cmd into C:\Windows
  2. Customize the script (S3 credentials, S3 endpoint, folders, ...)
  3. Create the file C:\Windows\resticbackup.password containing the restic repository password
  4. Install the restic binary at C:\Windows\restic.exe
  5. Create a task in Windows' task scheduler application that executes the C:\Windows\resticbackup.cmd script as an action on the desired schedule (e.g. nightly).
@echo off
:The S3 access key
set "AWS_ACCESS_KEY_ID="
:The S3 secret key
set "AWS_SECRET_ACCESS_KEY="
restic --repo "s3:https://s3 host/bucket name/" --password-file C:\Windows\resticbackup.password backup --limit-upload 8000 <folders*>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment