{"id":1021,"date":"2012-02-04T14:04:46","date_gmt":"2012-02-04T13:04:46","guid":{"rendered":"http:\/\/kudzia.eu\/b\/?p=1021"},"modified":"2025-03-02T10:57:09","modified_gmt":"2025-03-02T09:57:09","slug":"cloning-the-server-using-rsync","status":"publish","type":"post","link":"https:\/\/kudzia.eu\/b\/2012\/02\/cloning-the-server-using-rsync\/","title":{"rendered":"cloning the server using rsync"},"content":{"rendered":"<p>braindump of things to do\/directories not to copy when cloning physical debian to a vm using rsync<br \/>\n<!--more--><br \/>\nwarning &#8211; below is very much server dependent; stop all the &#8216;moving parts&#8217; &#8211; in my case &#8211; cron jobs, mysql server.<\/p>\n<ul>\n<li>prepare destination system &#8211; do proper partitioning, install the base system<\/li>\n<li>assign temporary address to the new server so old and new one can talk one to another<\/li>\n<li>\nrun on both machines:<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\napt-get install rsync\r\n\/etc\/init.d\/cron stop; \/etc\/init.d\/mysql stop # very much server-role dependent\r\n<\/pre>\n<\/li>\n<li>run on the old one:\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\ncd \/\r\nrsync --exclude dev\/ --exclude proc\/ --exclude lib\/modules --exclude sys\/ --exclude etc\/fstab  --exclude etc\/udev --exclude boot\/ --exclude etc\/mtab --exclude etc\/lvm\/ --include \".*\" -Rav --delete -e \"ssh -c arcfour \" .\/ root@newServer:\/\r\n<\/pre>\n<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>braindump of things to do\/directories not to copy when cloning physical debian to a vm using rsync<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[17],"tags":[64,28,6,56,65],"class_list":["post-1021","post","type-post","status-publish","format-standard","hentry","category-tech","tag-cloning","tag-debian","tag-linux","tag-rsync","tag-virtualization"],"_links":{"self":[{"href":"https:\/\/kudzia.eu\/b\/wp-json\/wp\/v2\/posts\/1021","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kudzia.eu\/b\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kudzia.eu\/b\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kudzia.eu\/b\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kudzia.eu\/b\/wp-json\/wp\/v2\/comments?post=1021"}],"version-history":[{"count":19,"href":"https:\/\/kudzia.eu\/b\/wp-json\/wp\/v2\/posts\/1021\/revisions"}],"predecessor-version":[{"id":3714,"href":"https:\/\/kudzia.eu\/b\/wp-json\/wp\/v2\/posts\/1021\/revisions\/3714"}],"wp:attachment":[{"href":"https:\/\/kudzia.eu\/b\/wp-json\/wp\/v2\/media?parent=1021"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kudzia.eu\/b\/wp-json\/wp\/v2\/categories?post=1021"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kudzia.eu\/b\/wp-json\/wp\/v2\/tags?post=1021"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}