Tightened permissions, added testing section

This commit is contained in:
Ashten 2025-01-09 08:30:12 -08:00
parent 2879532967
commit 6a8996cffd

View file

@ -29,7 +29,7 @@ Copy the `config_example` to `config`, verify permissions, and then edit using y
sudo su
cp config_example config
chown root:root config
chmod 700 config
chmod 600 config
nano config
```
Next, you'll need to run initial setup on the S3 repository:
@ -44,6 +44,20 @@ And finally, set your crontab file with `sudo crontab -e`:
0 * * * * /backups/backup.sh > /backups/logfile.log
```
# Testing:
Make sure that everything works by running the backup script atleast once by hand:
```bash
sudo su
cd /backups/
./backup.sh
```
Once complete, check that a snapshot exists in the backup:
```bash
set -a
source config
restic -r "$S3_BUCKET" snapshots
```
I also recommend doing a test restore as discussed in the next section.
# Restoring:
You'll need to grab your config variables before restoring:
```bash