---
# System prepended metadata

title: ③ ラズパイをバクアップする
tags: [raspberry-pi]

---

---
tags: raspberry-pi
---


# ③ ラズパイをバクアップする

まずはbackup 

https://raspberrypi.stackexchange.com/questions/311/how-do-i-backup-my-raspberry-pi


まずはブロックデバイスの確認

```shell
[mike@mike-pc ~/Workspace/lm-tokyo][20:24:50][O][I][%][λ]> lsblk -p

NAME             MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
/dev/sdb           8:16   1  29.5G  0 disk
├─/dev/sdb1        8:17   1   256M  0 part /run/media/mike/boot
└─/dev/sdb2        8:18   1  29.3G  0 part /run/media/mike/rootfs
```

一応umountした

```shell
[mike@mike-pc ~/Workspace/lm-tokyo][20:26:39][X][I][%][λ]> sudo umount /dev/sdb1
[mike@mike-pc ~/Workspace/lm-tokyo][20:26:42][O][I][%][λ]> sudo umount /dev/sdb2
[mike@mike-pc ~/Workspace/lm-tokyo][20:26:46][O][I][%][λ]> lsblk -p
NAME             MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
/dev/sdb           8:16   1  29.5G  0 disk
├─/dev/sdb1        8:17   1   256M  0 part
└─/dev/sdb2        8:18   1  29.3G  0 part
```

オプションの意味はここがわかりやすい (https://www.atmarkit.co.jp/ait/articles/1711/30/news027.html)  。

```shell=
$ sudo dd of=edge-0430.img if=/dev/sdc bs=8M conv=fsync status=progress
22531801088 bytes (23 GB, 21 GiB) copied, 1290 s, 17.5 MB/s
25912410112 bytes (26 GB, 24 GiB) copied, 1485 s, 17.4 MB/s\
26449281024 bytes (26 GB, 25 GiB) copied, 1515 s, 17.5 MB/s
31717326848 bytes (32 GB, 30 GiB) copied, 1809 s, 17.5 MB/s
7562+1 records in
7562+1 records out
31719424000 bytes (32 GB, 30 GiB) copied, 1810.83 s, 17.5 MB/s
```

# 別のSDに焼く

```shell
$ sudo dd if=edge-0403.img of=/dev/sdc bs=8M conv=fsync status=progress
```

# Confirm Device Name

```shell
pi@raspberrypi:~/Desktop/edge-os-main $ v4l2-ctl --list-device
bcm2835-codec-decode (platform:bcm2835-codec):
	/dev/video10
	/dev/video11
	/dev/video12

bcm2835-isp (platform:bcm2835-isp):
	/dev/video13
	/dev/video14
	/dev/video15
	/dev/video16

JOYACCESS JA-Webcam: JOYACCESS  (usb-0000:01:00.0-1.2.2):
	/dev/video0
	/dev/video1
```
