btrfs文件系统提供了子卷功能,可以通过创建快照的方式,轻松建立副本。但是,这仅限于同一个btrfs文件系统内。
我现在想把主机上btrfs文件系统中的两个子卷,复制到移动硬盘上的btrfs文件系统。请问有什么好的方法没有?
复制btrfs的子卷到另一个btrfs文件系统
版面规则
我们都知道新人的确很菜,也喜欢抱怨,并且带有浓厚的Windows习惯,但既然在这里询问,我们就应该有责任帮助他们解决问题,而不是直接泼冷水、简单的否定或发表对解决问题没有任何帮助的帖子。乐于分享,以人为本,这正是Ubuntu的精神所在。
我们都知道新人的确很菜,也喜欢抱怨,并且带有浓厚的Windows习惯,但既然在这里询问,我们就应该有责任帮助他们解决问题,而不是直接泼冷水、简单的否定或发表对解决问题没有任何帮助的帖子。乐于分享,以人为本,这正是Ubuntu的精神所在。
复制btrfs的子卷到另一个btrfs文件系统
Xubuntu 21.04 / 深度系统 20.2
为何热衷于搞发行版的多,搞应用程序开发的少?Linux最多余的就是各种发行版,最缺的就是应用程序,特别是行业应用程序。
为何热衷于搞发行版的多,搞应用程序开发的少?Linux最多余的就是各种发行版,最缺的就是应用程序,特别是行业应用程序。
Re: 复制btrfs的子卷到另一个btrfs文件系统
谢谢,从没想过bing,当然谷歌是用不了的。bing出来如下信息:
btrfs comes with a "send" and a "receive" command. One sends a subvolume, the other receives the data. This is done at a block-level, so you don't have to worry about preserving permissions, acls and timestamps. You can only source this from a readonly snapshot.
Snapshot created in the folder_0 path. Now to send it to another disk.
This will create a readonly subvolume on the new drive called folder_0, create a writeable snapshot to complete the move:
Clean up your old, temporary snapshots
btrfs comes with a "send" and a "receive" command. One sends a subvolume, the other receives the data. This is done at a block-level, so you don't have to worry about preserving permissions, acls and timestamps. You can only source this from a readonly snapshot.
代码: 全选
btrfs subvolume snapshot -r /mnt/old/folder /mnt/old/folder_0
代码: 全选
btrfs send /mnt/old/folder_0 | btrfs receive /mnt/new
代码: 全选
btrfs subvolume snapshot /mnt/new/folder_0 /mnt/new/folder
代码: 全选
btrfs subvolume delete /mnt/new/folder_0
btrfs subvolume delete /mnt/old/folder_0
Xubuntu 21.04 / 深度系统 20.2
为何热衷于搞发行版的多,搞应用程序开发的少?Linux最多余的就是各种发行版,最缺的就是应用程序,特别是行业应用程序。
为何热衷于搞发行版的多,搞应用程序开发的少?Linux最多余的就是各种发行版,最缺的就是应用程序,特别是行业应用程序。