{"id":1704,"date":"2026-04-29T18:15:52","date_gmt":"2026-04-29T18:15:52","guid":{"rendered":"\/blog\/?p=1704"},"modified":"2026-04-29T18:15:52","modified_gmt":"2026-04-29T18:15:52","slug":"better-rsync-options-for-migration","status":"publish","type":"post","link":"\/blog\/index.php\/better-rsync-options-for-migration\/","title":{"rendered":"better rsync options for migration"},"content":{"rendered":"\n<p>rsync -aAXH &#8211;numeric-ids &#8211;info=progress2 \/var\/ \/mnt\/newvar\/<\/p>\n\n\n\n<p>This command is a classic way to perform a&nbsp;<strong>full system-level migration<\/strong>&nbsp;of a directory while keeping every bit of metadata intact.<\/p>\n\n\n\n<p>Here is the breakdown of each option:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong><code>-a<\/code>\u00a0(Archive mode):<\/strong>\u00a0This is a shortcut for several flags. It preserves symbolic links, permissions, modification times, groups, and owners. It also ensures the copy is recursive.<\/li>\n\n\n\n<li><strong><code>-A<\/code>\u00a0(ACLs):<\/strong>\u00a0Preserves Access Control Lists. This ensures that any specific user\/group permissions set outside of standard Linux &#8220;rwx&#8221; permissions are carried over.<\/li>\n\n\n\n<li><strong><code>-X<\/code>\u00a0(Extended Attributes):<\/strong>\u00a0Preserves &#8220;xattrs&#8221; (like security labels or user-defined metadata). This is vital for systems using\u00a0<strong>SELinux<\/strong>.<\/li>\n\n\n\n<li><strong><code>-H<\/code>\u00a0(Hard links):<\/strong>\u00a0Tells rsync to look for hard links in the source and recreate them in the destination. Without this, rsync would copy each hard link as a separate, full file, wasting disk space.<\/li>\n\n\n\n<li><strong><code>--numeric-ids<\/code>:<\/strong>\u00a0Tells rsync to transfer the\u00a0<strong>UID\/GID numbers<\/strong>\u00a0as they are, rather than trying to map them by username\/group name. This is crucial when copying to a drive that will be used by a different OS or a &#8220;Live&#8221; environment where the user IDs might not match yet.<\/li>\n\n\n\n<li><strong><code>--info=progress2<\/code>:<\/strong>\u00a0Provides a modern, single-line progress bar for the\u00a0<strong>entire transfer<\/strong>\u00a0(showing total percentage and speed) rather than listing every single file as it goes.<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>rsync -aAXH &#8211;numeric-ids &#8211;info=progress2 \/var\/ \/mnt\/newvar\/ This command is a classic way to perform a&nbsp;full system-level migration&nbsp;of a directory while keeping every bit of metadata intact. Here is the breakdown of each option:<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1704","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"\/blog\/index.php\/wp-json\/wp\/v2\/posts\/1704","targetHints":{"allow":["GET"]}}],"collection":[{"href":"\/blog\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"\/blog\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"\/blog\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"\/blog\/index.php\/wp-json\/wp\/v2\/comments?post=1704"}],"version-history":[{"count":1,"href":"\/blog\/index.php\/wp-json\/wp\/v2\/posts\/1704\/revisions"}],"predecessor-version":[{"id":1705,"href":"\/blog\/index.php\/wp-json\/wp\/v2\/posts\/1704\/revisions\/1705"}],"wp:attachment":[{"href":"\/blog\/index.php\/wp-json\/wp\/v2\/media?parent=1704"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"\/blog\/index.php\/wp-json\/wp\/v2\/categories?post=1704"},{"taxonomy":"post_tag","embeddable":true,"href":"\/blog\/index.php\/wp-json\/wp\/v2\/tags?post=1704"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}