<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="../assets/xml/rss.xsl" media="all"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>.:: Marcos Dione/StyXman's glob ::. (Posts about bazaar)</title><link>https://www.grulic.org.ar/~mdione/glob/</link><description></description><atom:link href="https://www.grulic.org.ar/~mdione/glob/categories/bazaar.xml" rel="self" type="application/rss+xml"></atom:link><language>en</language><copyright>Contents © 2025 &lt;a href="mailto:mdione@grulic.org.ar"&gt;Marcos Dione&lt;/a&gt; </copyright><lastBuildDate>Thu, 29 May 2025 15:41:12 GMT</lastBuildDate><generator>Nikola (getnikola.com)</generator><docs>http://blogs.law.harvard.edu/tech/rss</docs><item><title>Backing up bazaar repos</title><link>https://www.grulic.org.ar/~mdione/glob/posts/backing-up-bazaar-repos/</link><dc:creator>Marcos Dione</dc:creator><description>&lt;p&gt;In one of my previous post I mentioned that my blog was brokenito. Actually my
blog is just a bunch of markdown files that I compile in a blog with
&lt;a href="htpp://ikiwiki.info/"&gt;ikiwiki&lt;/a&gt;, and I store it in a &lt;code&gt;Bazaar&lt;/code&gt; repo.&lt;/p&gt;
&lt;p&gt;A month ago I bought a new hardisk that I installed in my notebook, replacing
the one that used to have the sources of my blog. I reinstalled Debian Sid from
scratch&lt;sup id="fnref:1"&gt;&lt;a class="footnote-ref" href="https://www.grulic.org.ar/~mdione/glob/posts/backing-up-bazaar-repos/#fn:1"&gt;1&lt;/a&gt;&lt;/sup&gt; and just grabbed everything from the backups (yes, I have weekly
backups. How many can say that? :)&lt;/p&gt;
&lt;p&gt;The problem was this: the backups included the &lt;code&gt;Bazaar&lt;/code&gt; working copies/branches,
except for the (normally empty) directory &lt;code&gt;.bzr/repository/upload/&lt;/code&gt;. This
directory is populated with a temporary file each time you do a commit, but
&lt;code&gt;bzr&lt;/code&gt; doesn't try to create it if it doesn't exist. I think they
assume it's a given because it's created when you do a &lt;code&gt;bzr init&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;So here are two bugs: first my backup system (just a &lt;code&gt;bash&lt;/code&gt; script that runs
&lt;code&gt;rsync&lt;/code&gt;) should store empty directories (fixed) and I think &lt;code&gt;bzr&lt;/code&gt; should create
the dir if it's not there. I will try to make a patch and submmit a wish in
their bugtracker.&lt;/p&gt;
&lt;p&gt;This oneliner should fix all my restored repos:&lt;/p&gt;
&lt;div class="code"&gt;&lt;pre class="code literal-block"&gt;find&lt;span class="w"&gt; &lt;/span&gt;.&lt;span class="w"&gt; &lt;/span&gt;-name&lt;span class="w"&gt; &lt;/span&gt;.bzr&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;while&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;read&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;repo&lt;span class="p"&gt;;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;do&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;mkdir&lt;span class="w"&gt; &lt;/span&gt;-vp&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;$repo&lt;/span&gt;/repository/upload/&lt;span class="p"&gt;;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;done&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;

&lt;div class="footnote"&gt;
&lt;hr&gt;
&lt;ol&gt;
&lt;li id="fn:1"&gt;
&lt;p&gt;Somehow I feel the new instalation faster than the previous one, specially
  when installing new software or updates. I think this might be related to the
  high fragmentation that the old system might have. I should explore this. &lt;a class="footnote-backref" href="https://www.grulic.org.ar/~mdione/glob/posts/backing-up-bazaar-repos/#fnref:1" title="Jump back to footnote 1 in the text"&gt;↩&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;</description><category>bazaar</category><category>sysadmin</category><guid>https://www.grulic.org.ar/~mdione/glob/posts/backing-up-bazaar-repos/</guid><pubDate>Fri, 19 Mar 2010 18:10:22 GMT</pubDate></item></channel></rss>