bigbubblegum / raspberrybackup Goto Github PK
View Code? Open in Web Editor NEW在Linux系统中一键备份树莓派系统SD卡的脚本
在Linux系统中一键备份树莓派系统SD卡的脚本
device=/dev/mapper/sudo kpartx -va $loopdevice | sed -E 's/.*(loop[0-9])p.*/\1/g' | head -1
这一句话可能导致如果你的loop超过10以后将很报错
你的正则表达式只操作了loop0-loop9 超过将会报错,所以最好改为s/.(loop[0-9]+)p./\1/g
最后是这样
device=/dev/mapper/sudo kpartx -va $loopdevice | sed -E 's/.*(loop[0-9]+)p.*/\1/g' | head -1
===================== part 4, backup /boot =========================
cp: failed to preserve ownership for './tgt_boot/README': Operation not permitted
cp: failed to preserve ownership for './tgt_boot/System Volume Information/WPSettings.dat': Operation not permitted
cp: failed to preserve ownership for './tgt_boot/System Volume Information/IndexerVolumeGuid': Operation not permitted
cp: failed to preserve ownership for './tgt_boot/System Volume Information': Operation not permitted
cp: failed to preserve ownership for './tgt_boot/bcm2710-rpi-2-b.dtb': Operation not permitted
cp: failed to preserve ownership for './tgt_boot/bcm2710-rpi-2-b.dtb.bak': Operation not permitted
cp: failed to preserve ownership for './tgt_boot/bcm2710-rpi-3-b-plus.dtb': Operation not permitted
cp: failed to preserve ownership for './tgt_boot/bcm2710-rpi-3-b-plus.dtb.bak': Operation not permitted
~ directory has not enought size to contain file , can we define a udisk path to contain backup file?
device=/dev/mapper/
sudo kpartx -va $loopdevice | sed -E 's/.(loop[0-9])p./\1/g' | head -1 这一句话可能导致如果你的loop超过10以后将很报错 你的正则表达式只操作了loop0-loop9 超过将会报错,所以最好改为s/.(loop[0-9]+)p./\1/g 最后是这样 `device=/dev/mapper/`sudo kpartx -va $loopdevice | sed -E 's/.*(loop[0-9]+)p.*/\1/g' | head -1
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.