Created
November 28, 2022 19:31
-
-
Save christianrickert/eb220706346c743ba94b0ced5456d002 to your computer and use it in GitHub Desktop.
(Windows) restic backup to a network drive
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@ECHO OFF | |
TITLE Restic backup | |
:: mount network drive for Administrator command prompt | |
NET USE Z: \\data.server.pvt\your\data | |
:: manually create remote restic repository with (optional) compression | |
:: restic.exe init --repo "Z:\repo" --repository-version latest | |
:: set RESTIC_PASSWORD system variable before accessing repository | |
CMD /C START "Restic backup [C:\]" /BELOWNORMAL /WAIT restic.exe backup --repo "Z:\repo" --compression off --use-fs-snapshot --verbose C:\ | |
CMD /C START "Restic backup [D:\]" /BELOWNORMAL /WAIT restic.exe backup --repo "Z:\repo" --compression off --use-fs-snapshot --verbose D:\ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment