Skip to main content

Alpine local backup

  • apkvol
  • lbu - Alpine local backup
    • 默认只关心 /etc 下内容,不包含 /etc/init.d
    • 相当于把所有 /etc 下的内容进行备份或恢复
    • 安装所需包
# 制作 rootfs.apkvolcurl -LO https://mirrors.aliyun.com/alpine/v3.12/releases/x86_64/alpine-minirootfs-3.12.0-x86_64.tar.gzmkdir -p rootfstar zxf alpine-minirootfs-3.12.0-x86_64.tar.gz -C rootfs
cp /etc/apk/repositories rootfs/etc/apk/# 可选 - chroot 后可 apk add# echo nameserver 114.114.114.114 > rootfs/etc/resolv.confapk --root rootfs add alpine-conf
# 获取到 rootfs.apkvolchroot rootfs/ lbu pkg rootfs.apkvol.tar.gzmv rootfs/rootfs.apkvol.tar.gz .