SSH rsync Backup einrichten: Unterschied zwischen den Versionen
Erscheinungsbild
Keine Bearbeitungszusammenfassung |
Keine Bearbeitungszusammenfassung |
||
| Zeile 12: | Zeile 12: | ||
bash -c ./backup.sh | bash -c ./backup.sh | ||
</syntaxhighlight> | </syntaxhighlight> | ||
backup.sh | |||
<syntaxhighlight lang="bash"> | |||
#!/usr/bin/env bash | |||
rsync -rt --no-p --no-g --human-readable --progress --itemize-changes --exclude-from=exclude.txt --delete --log-file=log_neu.txt /cygdrive/c/Users/simon/Downloads/ USER@backup.zeberliedv.ch:test | |||
</syntaxhighlight> | |||
exclude.txt | |||
<syntaxhighlight lang="text"> | |||
- /System\ Volume\ Information/* | |||
- /Microsoft\ SQL\ Server/* | |||
</syntaxhighlight> | |||
<syntaxhighlight lang="-"></syntaxhighlight> | <syntaxhighlight lang="-"></syntaxhighlight> | ||
Version vom 24. Juni 2016, 08:35 Uhr
- Cygwin64 auf Server installieren
https://www.cygwin.com/
- Cygwin.bat starten damit das Home Verziechnis erstellt wird.
- Navigiere zu C:\cygwin64\home\USER
- Erstelle folgende Files:
start_bash_script.cmd
@SET ECHO ON
SETLOCAL
PATH = C:\cygwin64\bin;%PATH%
bash -c ./backup.sh
backup.sh
#!/usr/bin/env bash
rsync -rt --no-p --no-g --human-readable --progress --itemize-changes --exclude-from=exclude.txt --delete --log-file=log_neu.txt /cygdrive/c/Users/simon/Downloads/ USER@backup.zeberliedv.ch:test
exclude.txt
- /System\ Volume\ Information/*
- /Microsoft\ SQL\ Server/*