{"id":37,"date":"2010-10-12T21:24:22","date_gmt":"2010-10-13T02:24:22","guid":{"rendered":"http:\/\/pavelshub.com\/blog\/?p=37"},"modified":"2010-10-12T21:26:13","modified_gmt":"2010-10-13T02:26:13","slug":"keeping-a-desktop-laptop-in-sync","status":"publish","type":"post","link":"https:\/\/pavelshub.com\/blog\/2010\/10\/keeping-a-desktop-laptop-in-sync\/","title":{"rendered":"Keeping a Desktop &#038; Laptop in Sync"},"content":{"rendered":"<p>\nThis post is tagged as backlogged, so the stuff I&#8217;m writing here isn&#8217;t exactly &#8220;new&#8221;. Anyway a few years ago (2) I became an owner of a 12&#8243; laptop which was useful to take to class but needed to be constantly synced with my desktop.\n<\/p>\n<p>\nFortunately Gentoo had <a href=\"http:\/\/www.cis.upenn.edu\/~bcpierce\/unison\/\">Unison<\/a> in its repository. This program works very well and presents a graphics merge window when conflicts arise. After searching for a Sync solution for a while, this is the best that I could find. Emerging unison on Gentoo gets you an executable with a version number to it. A quick<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nln -s \/usr\/bin\/unison-2.27 \/usr\/bin\/unison\r\n<\/pre>\n<p>fixes that inconvenience.\n<\/p>\n<p>Below is an example unison config in case anyone finds it useful. I saved the file as <b>default.prf<\/b> in the unison directory. <\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\n# Unison preferences file\r\nroot = \/home\/cogent\r\nroot = ssh:\/\/Turm\r\n# Paths that I want to sync\r\n\r\npath = my_stuff\r\npath = school\r\npath = workspace\r\n#path = work\r\npath = .ssh\r\npath = .purple\r\npath = .gnupg\r\n#path = .thunderbird\r\npath = archive\/music\r\n\r\nignore = Name *~\r\nignore = Name .purple\/status.xml\r\nignore = Path .purple\/accels\r\nignore = Name .purple\/blist.xml\r\nignore = Name .purple\/prefs.xml\r\nignore = Name .purple\/accounts.xml\r\n\r\nlog = false\r\nheight = 40\r\n<\/pre>\n<p>Having done that, running<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nunison default\r\n<\/pre>\n<p>resulted in a purely automatic sync. To get the process as smooth as possible, you should <a href=\"http:\/\/rcsg-gsir.imsb-dsgi.nrc-cnrc.gc.ca\/documents\/internet\/node31.html\">add your ssh keys<\/a> to the respective machines. That way you won&#8217;t be asked for the password each time. Also, be sure to connect to the machine at least once before connecting with unison. If I remember correctly, it doesn&#8217;t present the &#8220;add this machine to know ssh hosts&#8221; dialog correctly. Possibly resulting in a silent failure.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This post is tagged as backlogged, so the stuff I&#8217;m writing here isn&#8217;t exactly &#8220;new&#8221;. Anyway a few years ago (2) I became an owner of a 12&#8243; laptop which was useful to take to class but needed to be &hellip;<\/p>\n<p class=\"read-more\"><a href=\"https:\/\/pavelshub.com\/blog\/2010\/10\/keeping-a-desktop-laptop-in-sync\/\">Read more &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[3],"tags":[5,4,6],"class_list":["post-37","post","type-post","status-publish","format-standard","hentry","category-sysadmin","tag-backlogged","tag-gentoo","tag-unison"],"_links":{"self":[{"href":"https:\/\/pavelshub.com\/blog\/wp-json\/wp\/v2\/posts\/37","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pavelshub.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pavelshub.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pavelshub.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/pavelshub.com\/blog\/wp-json\/wp\/v2\/comments?post=37"}],"version-history":[{"count":7,"href":"https:\/\/pavelshub.com\/blog\/wp-json\/wp\/v2\/posts\/37\/revisions"}],"predecessor-version":[{"id":44,"href":"https:\/\/pavelshub.com\/blog\/wp-json\/wp\/v2\/posts\/37\/revisions\/44"}],"wp:attachment":[{"href":"https:\/\/pavelshub.com\/blog\/wp-json\/wp\/v2\/media?parent=37"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pavelshub.com\/blog\/wp-json\/wp\/v2\/categories?post=37"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pavelshub.com\/blog\/wp-json\/wp\/v2\/tags?post=37"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}