当前位置:网站首页>树莓派入门(5)系统备份
树莓派入门(5)系统备份
2022-08-11 03:07:00 【jualay】
一、全卡备份
1.win32DiskImager
新建空img文件
将TF卡插入电脑,可以看到有两个分区,我们要备份的是root区而不是boot区
所以映像文件选1.img,设备选择G:
然后再点击读取
2.SD Card Copier
将TF卡插入树莓派,可看到
选择好从哪复制和复制到哪,点击start
等待复制完成
3.终端命令
查询路径
lsblk
备份命令
sudo dd if=/dev/mmcblk0 of=/dev/sda #if:从哪复制
#of:复制到哪
sudo ps -ef | grep dd #新终端界面查看dd命令进程号
sudo watch-n 3 kill_USR1 pid #pid:查到的进程号
#发送USR1(用户自定义信号),查看copy进度
#结合watch就可以实时刷新
二、rpi-backup压缩备份
备份的是boot区和root区使用过的部分
1.查看当前系统卡的剩余空间
df -h
2.备份
(1)备份文件大小为:已用空间1.2
(2)若剩余空间足够就直接存在系统卡上,不够就存到新SD卡上
(3)如果需要备份到外部设备,设备务必挂载到/media,不要挂载到/mnt,因为创建的镜像会挂载到/mnt进行操作*****
git clone https://github.com/nanhantianyi/rpi-backup.git && cd rpi-backup
sudo bash back.sh xxx.img (xxx.img为备份文件名,自行修改)
3.扩容
恢复系统后执行
sudo bash resize.sh
扩容root分区,也可以用树莓派raspi-config
sudo raspi-config
选择"Advanced Options"回车
然后选择"A1 Expand Filesystem Ensures that all of ….",回车
询问是否修改root分区,直接回车
到首页面,按"Tab"键,选择"Finish",回车
询问是否重启,选择重启
重启完后,输入"df -h",会发现root分区已经扩容成功
三、参考资料
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
边栏推荐
- alibaba数据同步组件canal的实践整理
- Meaning of df and df -lh
- Window function application of sum and count
- js中的this问题
- 按摩椅控制板的开发让按摩椅变得简约智能
- ESP32的环境配置(arduino arduino2.0 VScode platform哪个好用?)
- AI+Medical: Using Neural Networks for Medical Image Recognition and Analysis
- Deep Learning - Second Time
- 增加对 Textbundle 的支持
- The practice of alibaba data synchronization component canal
猜你喜欢
随机推荐
(Nips-2015)空间变换器网络
怎么删除语句审计日志?
字体反扒
Salesforce disbands the Chinese team, which CRM product is more suitable for the Chinese
this question in js
CTO说MySQL单表行数不要超过2000w,为啥?
关于地图GIS开发事项的一次实践整理(上)
postgresql ilike create function
深度学习中的模型设计
(CVPR-2017)在身体和潜在部位学习深度上下文感知特征以进行行人重识别
[机缘参悟-66]:怎样才能让别人愿意帮你:利益共享法则、“大道”、“人性”
Idea (优选)cherry-pick操作
ROS源代码阅读(1)
BUU brushing record
Official release丨VS Code 1.70
"Life Is Like First Seen" is ill-fated, full of characters, and the contrast of Zhu Yawen's characters is too surprising
Docker 链接sqlserver时出现en-us is an invalid culture错误解决方案
Some work experience after joining the digital ic design
混币器Tornado遭制裁 对DeFi市场意味着什么?
Add user error useradd: cannot open /etc/passwd