Skip to content

Commit e758bf2

Browse files
author
Patrick M
committed
fix: update docs
1 parent e0a82b1 commit e758bf2

File tree

2 files changed

+37
-4
lines changed

2 files changed

+37
-4
lines changed

_posts/2023-06-16-back-up-rpi-live.md

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ ls -lah /usr/local/sbin/image-*
4444

4545
## Running the Backup
4646

47-
Now you should be able to use `image-backup`. I typically run the following command, and even add it to crontab.
47+
Now you should be able to use `image-backup`.
4848

4949
```bash
5050
sudo image-backup --initial /mnt/backup/$(date +"%Y-%m-%d").img,,5000
@@ -54,8 +54,32 @@ The backup run time will depend on your device and how much data it needs to cop
5454

5555
> Backup can be pretty large, ~15GB depending on how much you have running on your Pi
5656
57-
Once you have a completed backup, you can run an incremental backup by running the following
57+
Once you have a completed backup, you can run an incremental backup by running `image-backup` and providing an exisiting backup to update.
5858

5959
```bash
6060
image-backup <image_name.img>
61-
```
61+
```
62+
63+
## Crontab
64+
65+
If you'd like to automate your backup, you can pretty easily using crontab. First create the script you'd like to run. I like to put it in `/root/.local/bin`.
66+
67+
```bash
68+
sudo nano /root/.local/bin/backup
69+
```
70+
71+
```bash
72+
#!/bin/bash
73+
74+
# Backup RPI
75+
image-backup --initial /mnt/backup/rpi1_$(date +%Y-%m-%d).img,,5000
76+
```
77+
78+
Then you'll have to add the following to crontab. Because we put our image-util files in `/usr/local/sbin` we'll have to define that in the crontab path.
79+
80+
```bash
81+
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin
82+
0 6 * * * /bin/bash /root/.local/bin/backup > /var/log/backup.log 2>&1
83+
```
84+
85+
Notice this will run the backup script every morning at 6am and log out to `/var/log/backup.log`

_posts/2023-06-16-mounting-smb-share-at-boot.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,16 @@ category: "Service Setup"
66
tags: ['linux', 'fstab', 'smb']
77
---
88

9-
Very frequently I need to mount SMB2 or SMB3 shares inside of my linux devices. To do so I usually use `fstab`.
9+
Very frequently I need to mount SMB2 or SMB3 shares inside of my linux devices. To do so I usually use `fstab`.
10+
11+
## Depenedencies
12+
13+
You will need to install Samba and CIFS utilities
14+
15+
```bash
16+
sudo apt update
17+
sudo apt install samba smbclient cifs-utils -y
18+
```
1019

1120
## `fstab`
1221

0 commit comments

Comments
 (0)