当前位置:网站首页>Getting Started with Raspberry Pi (5) System Backup
Getting Started with Raspberry Pi (5) System Backup
2022-08-11 03:19:00 【julay】
目录
一、全卡备份
1.win32DiskImager

新建空img文件

将TF卡插入电脑,可以看到有两个分区,What we want to back up isroot区而不是boot区

So the image file is selected1.img,设备选择G:

Then click Read again

2.SD Card Copier
将TF卡插入树莓派,可看到


Choose where to copy from and where to copy,点击start

等待复制完成
3.终端命令
查询路径
lsblk

备份命令
sudo dd if=/dev/mmcblk0 of=/dev/sda #if:从哪复制
#of:复制到哪
sudo ps -ef | grep dd #View the new terminal interfaceddCommand process number
sudo watch-n 3 kill_USR1 pid #pid:查到的进程号
#发送USR1(用户自定义信号),查看copy进度
#结合watchcan be refreshed in real time
二、rpi-backup压缩备份
备份的是boot区和rootThe used part of the area
1.Check the remaining space of the current system card
df -h

2.备份
(1)备份文件大小为:已用空间1.2
(2)If the remaining space is sufficient, it will be directly stored on the system card,If not enough, save to newSD卡上
(3)Backup to an external device if needed,The device must be mounted to/media,不要挂载到/mnt,Because the created image will be mounted to /mnt进行操作*****
git clone https://github.com/nanhantianyi/rpi-backup.git && cd rpi-backup
sudo bash back.sh xxx.img (xxx.imgis the backup file name,自行修改)
3.扩容
Execute after the system is restored
sudo bash resize.sh
扩容root分区,Raspberry Pi can also be usedraspi-config
sudo raspi-config
选择"Advanced Options"回车

然后选择"A1 Expand Filesystem Ensures that all of ….",回车
Ask to modifyroot分区,直接回车

to the first page,按"Tab"键,选择"Finish",回车

询问是否重启,选择重启
重启完后,输入"df -h",会发现rootThe partition has been expanded successfully
三、参考资料
1.https://blog.csdn.net/lzjsqn/article/details/72058293
2.4.14.114-OPENFANS+20190602-v8 64位debain系统 /usr/sbin/resize.root 脚本
3.https://www.bilibili.com/video/BV1fL411u71E?share_source=copy_web
边栏推荐
猜你喜欢

Realization of vending machine function based on FPGA state machine

JS-DOM element object

互换性与测量技术-公差原则与选用方法

互换性测量技术-几何误差

分布式和集群的区别和联系

"Life Is Like First Seen" is ill-fated, full of characters, and the contrast of Zhu Yawen's characters is too surprising

AI+医疗:使用神经网络进行医学影像识别分析

入职数字ic设计后的一些工作心得

Some work experience after joining the digital ic design

ES6进阶 字符串处理新特性
随机推荐
KingbaseES有什么办法,默认不读取sys_catalog下的系统视图?
flink The object probably contains or references non serializable fields.
求和、计数的窗口函数应用
Salesforce disbands the Chinese team, which CRM product is more suitable for the Chinese
UNI-APP_iphone苹果手机底部安全区域
CTO说MySQL单表行数不要超过2000w,为啥?
Briefly, talk about the use of @Transactional in the project
常用认证机制
The negative semantic transformation layer
typedef定义结构体数组类型
Add support for Textbundle
[DB operation management/development solution] Shanghai Daoning provides you with an integrated development tool to improve the convenience of work - Orange
深度学习-第二次
Google search skills - programmer is recommended
作业8.10 TFTP协议 下载功能
Idea (preferred) cherry-pick operation
Goodbye Guangzhou paper invoices!The issuance of electronic invoices for accommodation fees will completely replace the invoices of hotels, restaurants and gas stations
oracle的基数会影响到查询速度吗?
【Pdf自动生成书签】
"Life Is Like First Seen" is ill-fated, full of characters, and the contrast of Zhu Yawen's characters is too surprising