You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Tsia 393ef12bb6 Update README.md 7 months ago
README.md Update README.md 7 months ago
restic.env Add new file 7 months ago
restic_backup.sh Add restic backup script 7 months ago

README.md

restic-backup

NAS

apt -y install restic screen
useradd -m -r -s /bin/sh restic

Local

apt -y install restic
useradd -m -r -s /bin/false restic
chgrp restic /usr/bin/restic
chmod 750 /usr/bin/restic
setcap cap_dac_read_search=+ep /usr/bin/restic
mkdir -p /var/lib/restic/
chown restic:restic /var/lib/restic/
chmod 750 /var/lib/restic/
mkdir -p /usr/local/scripts/
cp restic_backup.sh /usr/local/scripts/
chown restic:restic /usr/local/scripts/restic_backup.sh
chmod 755 /usr/local/scripts/restic_backup.sh
cp restic.env /usr/local/scripts/
chown restic:restic /usr/local/scripts/restic.env
chmod 400 /usr/local/scripts/restic.env
crontab -eu restic
# */10 * * * * /usr/local/scripts/restic_backup.sh > /var/log/restic_backup.log
su - restic
ssh-keygen -t ed25519
ssh-copy-id restic@nas