@@ -36,39 +36,39 @@ For those familiar with setting up backup scripts, here is a fast track to get y
3636
37371 . ** Download files**
3838
39- ``` sh
40- mkdir -p /root/scripts/backup && cd /root/scripts/backup
41- curl -LO https://raw.githubusercontent.com/buildplan/restic-backup-script/refs/heads/main/restic-backup.sh
42- curl -LO https://raw.githubusercontent.com/buildplan/restic-backup-script/refs/heads/main/restic-backup.conf
43- curl -LO https://raw.githubusercontent.com/buildplan/restic-backup-script/refs/heads/main/restic-excludes.txt
44- chmod +x restic-backup.sh
45- ```
39+ ``` sh
40+ mkdir -p /root/scripts/backup && cd /root/scripts/backup
41+ curl -LO https://raw.githubusercontent.com/buildplan/restic-backup-script/refs/heads/main/restic-backup.sh
42+ curl -LO https://raw.githubusercontent.com/buildplan/restic-backup-script/refs/heads/main/restic-backup.conf
43+ curl -LO https://raw.githubusercontent.com/buildplan/restic-backup-script/refs/heads/main/restic-excludes.txt
44+ chmod +x restic-backup.sh
45+ ```
4646
47472. ** Edit configuration**
4848
49- - Update ` restic-backup.conf ` with repository details, backup sources, and password file.
50- - Secure it: ` chmod 600 restic-backup.conf `
49+ - Update ` restic-backup.conf` with repository details, backup sources, and password file.
50+ - Secure it: ` chmod 600 restic-backup.conf`
5151
52523. ** Create password and initialize repository**
5353
54- ``` sh
55- # Create the password file (use a strong, unique password)
56- echo ' your-very-secure-password' | sudo tee /root/.restic-password
57- sudo chmod 400 /root/.restic-password
54+ ` ` ` sh
55+ # Create the password file (use a strong, unique password)
56+ echo ' your-very-secure-password' | sudo tee /root/.restic-password
57+ sudo chmod 400 /root/.restic-password
5858
59- # Initialize the repository
60- sudo ./restic-backup.sh --init
61- ```
59+ # Initialize the repository
60+ sudo ./restic-backup.sh --init
61+ ` ` `
6262
63634. ** First backup and schedule**
6464
65- ``` sh
66- # Run the first backup with verbose output
67- sudo ./restic-backup.sh --verbose
65+ ` ` ` sh
66+ # Run the first backup with verbose output
67+ sudo ./restic-backup.sh --verbose
6868
69- # Set up a recurring schedule via wizard (systemd or cron)
70- sudo ./restic-backup.sh --install-scheduler
71- ```
69+ # Set up a recurring schedule via wizard (systemd or cron)
70+ sudo ./restic-backup.sh --install-scheduler
71+ ` ` `
7272
7373> Default log: ` /var/log/restic-backup.log`
7474
@@ -532,9 +532,6 @@ If you prefer to manage the schedule manually instead of using the wizard, you c
5325322. Add the following lines to schedule your backups and maintenance.
533533
534534 ` ` ` crontab
535- # Define a safe PATH that includes the location of restic
536- PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
537-
538535 # Run the Restic backup every day at 3:00 AM
539536 0 3 * * * /root/scripts/backup/restic-backup.sh > /dev/null 2>&1
540537
0 commit comments