Difference between revisions of "File system cloning"

From ArchWiki
Jump to navigation Jump to search
(redirect to rsync#File system cloning, no point in having a separate article only to show some rsync options)
Line 1: Line 1:
This article provides ways to do a copy of all data in a file system while preserving as much information as possible, including the file system metadata. It is a procedure of data cloning on a file system level where source and destination file systems don't need to be of the same type. It can be used for backing up, file system migration or data recovery.
#redirect [[rsync#File system cloning]]
[[rsync]]'s ''archive'' mode comes close to being fit for the job, but it doesn't back up the special file system metadata such as access control lists, extended attributes or sparse file properties. For successful cloning at the file system level, some additional options need to be provided:
And their meaning is (from the manpage):
-H, --hard-links      preserve hard links
-A, --acls            preserve ACLs (implies -p)
-X, --xattrs          preserve extended attributes
-S, --sparse          handle sparse files efficiently
Produced copy can be simply reread and checked (for example after a data recovery attempt) at the file system level with {{ic|diff}}'s recursive option:
It is possible to do a successful file system migration by using [[rsync]] as described in this article and updating the [[fstab]] and [[bootloader]] as described in the [[Full_system_backup_with_rsync|Full system backup with rsync]] and [[Migrate_installation_to_new_hardware|Migrate installation to new hardware]] articles. This essentially provides a way to convert any root file system to another one.

Latest revision as of 04:46, 25 June 2017