computer:restic:windows:restic-backup

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
computer:restic:windows:restic-backup [2023/11/08 08:20] – created springcomputer:restic:windows:restic-backup [2023/11/09 09:34] (current) spring
Line 1: Line 1:
 ====== Windows-Rechner mit Restic sichern ====== ====== Windows-Rechner mit Restic sichern ======
  
-Restic-Windows-Binary herunterladen von ... und nach c:\windows\restic.exe kopieren+Restic-Windows-Binary herunterladen von https://github.com/restic/restic/releases/ und nach c:\windows\restic.exe kopieren
  
-Das Restic-Passwort sinnvollerweise als c:\users\<benutzername>\restic-password.txt abspeichern+Das Restic-Passwort als c:\users\<benutzername>\restic-password.txt abspeichern
  
-Restic mit allen Parametern wird über eine Batch-Datei c:\windows\run_restic gestartet+Restic mit allen Parametern wird über eine Batch-Datei gestartet
  
-<file c:\windows\restic_backup.cmd>+===== Restic-Start ===== 
 +<file bat c:\windows\restic_backup.cmd>
 echo off echo off
 cd %appdata% cd %appdata%
 c:\windows\restic.exe backup --password-file c:\users\<benutzername>\restic-password.txt -r rest:https://<abc>:<xyz>@restic.hermes.markus-spring.info -v --use-fs-snapshot --host <hostname> --exclude-caches c:\users\<benutzername>\ c:\windows\restic.exe backup --password-file c:\users\<benutzername>\restic-password.txt -r rest:https://<abc>:<xyz>@restic.hermes.markus-spring.info -v --use-fs-snapshot --host <hostname> --exclude-caches c:\users\<benutzername>\
 </file> </file>
 +
 +===== Start 1x täglich =====
  
 Die Aufgabenplanung braucht Unterstützung von einer cmd/bat-Datei, um sicherzustellen, dass das Backup nur einmal täglich ausgeführt wird. Die Aufgabenplanung braucht Unterstützung von einer cmd/bat-Datei, um sicherzustellen, dass das Backup nur einmal täglich ausgeführt wird.
  
-<file c:\windows\run_restic_once_day.bat>+<file bat c:\windows\run_restic_once_day.bat>
 @echo off @echo off
 setlocal EnableDelayedExpansion setlocal EnableDelayedExpansion
Line 25: Line 28:
 if defined lastRun if "%lastRun%"=="%myRun%" exit /b if defined lastRun if "%lastRun%"=="%myRun%" exit /b
 echo now running restic %myRun% %lastRun% echo now running restic %myRun% %lastRun%
 +c:\windows\restic_backup.cmd
 rem Kein Leerzeichen zwischen % und größer, sonst funktioniert der Vergleich nicht!!! rem Kein Leerzeichen zwischen % und größer, sonst funktioniert der Vergleich nicht!!!
 echo %myRun%> c:\windows\restic_last_run.txt echo %myRun%> c:\windows\restic_last_run.txt
 </file> </file>
  
 +===== Aufgabenplanung =====
 +
 +Die Aufgabenplanung wie folgt einrichten: 
 +{{:computer:restic:windows:pasted:20231108-082407.png}}
 +
 +{{:computer:restic:windows:pasted:20231108-082451.png}}
 +
 +{{:computer:restic:windows:pasted:20231108-082507.png}}
 +
 +{{:computer:restic:windows:pasted:20231108-082520.png}}
 +
 +===== Hosts-Datei =====
 +Ein lokaler Backupserver kann entweder über lokales DNS (pihole) oder auf jedem Windows-Client in der hosts-Datei bekanntgegeben werden.
 +<file bash c:\windows\system32\drivers\etc\hosts>
 +# localhost name resolution is handled within DNS itself.
 +# 127.0.0.1       localhost
 +# ::1             localhost
 +192.168.178.124       yournamehere.local
 +192.168.178.124       restic.yournamehere.local
 +192.168.178.124       resticinfo.yournamehere.local
 +192.168.178.124       pihole.yournamehere.local
 +</file>
  
  • computer/restic/windows/restic-backup.1699431645.txt.gz
  • Last modified: 2023/11/08 08:20
  • by spring