snippets:rpi:start
Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen der Seite angezeigt.
| Nächste Überarbeitung | Vorherige Überarbeitung | ||
| snippets:rpi:start [2014/03/08 19:03] – angelegt benh | snippets:rpi:start [2014/06/12 13:46] (aktuell) – benh | ||
|---|---|---|---|
| Zeile 13: | Zeile 13: | ||
| - mount with fstab <code bash> | - mount with fstab <code bash> | ||
| + | ===== Rsnapshot Backup ===== | ||
| + | - add backup user <code bash> | ||
| + | - edit sudo config <code bash> | ||
| + | - add the following lines to the file < | ||
| + | backupuser ALL=NOPASSWD: | ||
| + | - edit sshd config <code bash>vim / | ||
| + | - allow the backupuser access through ssh < | ||
| + | - change permissions of sshrc.tmp file <code bash> | ||
| + | - change user-environment to backupuser <code bash>su - backupuser</ | ||
| + | - create ssh directory <code bash> | ||
| + | - change permissions of ssh directory <code bash> | ||
| + | - authorize ssh-key of backupuser <code bash>vim .ssh/ | ||
| + | - add the following line to the file < | ||
| + | command="/ | ||
| + | </ | ||
| + | - create directory for scripts <code bash> | ||
| + | - add rsync-wrapper script <code bash>vim bin/ | ||
| + | - add the following code to the scriptfile < | ||
| + | #!/bin/sh | ||
| + | date >> / | ||
| + | echo $@ >> / | ||
| + | / | ||
| + | </ | ||
| + | - create script to validate ssh command <code bash>vim bin/ | ||
| + | - add the following code to the scriptfile < | ||
| + | #! /bin/bash | ||
| + | |||
| + | # | ||
| + | |||
| + | case " | ||
| + | | ||
| + | echo " | ||
| + | echo " | ||
| + | exit 1 | ||
| + | ;; | ||
| + | / | ||
| + | #/ | ||
| + | echo " | ||
| + | $SSH_ORIGINAL_COMMAND | ||
| + | ;; | ||
| + | *) | ||
| + | echo " | ||
| + | echo " | ||
| + | exit 1 | ||
| + | ;; | ||
| + | esac | ||
| + | </ | ||
| + | - give user permission to execute the script <code bash> | ||
snippets/rpi/start.1394301825.txt.gz · Zuletzt geändert: von benh
