<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:dw="https://www.dreamwidth.org">
  <id>tag:dreamwidth.org,2010-04-27:505737</id>
  <title>The Mandelbear's Musings</title>
  <subtitle>mdlbear</subtitle>
  <author>
    <name>mdlbear</name>
  </author>
  <link rel="alternate" type="text/html" href="https://mdlbear.dreamwidth.org/"/>
  <link rel="self" type="text/xml" href="https://mdlbear.dreamwidth.org/data/atom"/>
  <updated>2020-10-23T17:59:22Z</updated>
  <dw:journal username="mdlbear" type="personal"/>
  <entry>
    <id>tag:dreamwidth.org,2010-04-27:505737:1742138</id>
    <link rel="alternate" type="text/html" href="https://mdlbear.dreamwidth.org/1742138.html"/>
    <link rel="self" type="text/xml" href="https://mdlbear.dreamwidth.org/data/atom/?itemid=1742138"/>
    <title>Keeping backups</title>
    <published>2020-10-23T17:22:29Z</published>
    <updated>2020-10-23T17:59:22Z</updated>
    <category term="rsync"/>
    <category term="curmudgeon"/>
    <category term="backups"/>
    <category term="git"/>
    <category term="how-i-work"/>
    <category term="computers"/>
    <dw:music>owls somewhere outside</dw:music>
    <dw:mood>didactic</dw:mood>
    <dw:security>public</dw:security>
    <dw:reply-count>3</dw:reply-count>
    <content type="html">&lt;p&gt; It's been a while since I described the way I do backups -- in fact, &lt;a href="https://stephen.savitzky.net/Doc/Linux/keeping-backups/"&gt;the only
    public document&lt;/a&gt; I could find on the subject was written in 2006, and
    things have changed a great deal since then.  I believe there have been a
    few mentions in Dreamwidth and elsewhere, but in this calamitous year it
    seems prudent to do it again.  Especially since I'm starting to feel
    mortal, and starting to think that some day one of my kids is going to
    have to grovel through the whole mess and try to make sense of it.
    (Whether they'll find anything worth keeping or even worth the trouble of
    looking is, of course, an open question.)

&lt;p&gt; My home file server, a small Linux box called Nova, is backed up by simply
    copying (almost -- see below) its entire disk to an external hard drive
    every night.  (It's done using &lt;code&gt;rsync&lt;/code&gt;, which is efficient
    because it skips over everything that hasn't been changed since the last
    copy.)  When the disk crashes (it's almost always the internal disk,
    because the external mirror is idle most of the time) I can (and have,
    several times) swap in the external drive, make it bootable, order a new
    drive for the mirror, and I'm done.  Or, more likely, buy a new pair of
    drives that are twice as big for half the price, copy everthing, and
    archive the better of the old drives.  Update it occasionally.

&lt;p&gt; That's not very interesting, but it's not the whole story.  I used to make
    incremental backups -- instead of the mirror drive being an exact copy of
    the main one, it's a sequence of snapshots (like Apple's Time Machine, for
    example).  There were some problems with that, including the fact because
    of the way the snapshots were made (using &lt;code&gt;cp&amp;nbsp;-l&lt;/code&gt; to copy
    directories but leave hard links to the files that haven't changed) it
    takes more space than it needs to, and makes the backup disk very
    difficult -- not to mention slow -- to copy if it starts flaking out.
    There are ways of getting around those problems now, but I don't need
    them.

&lt;p&gt; The classic solution is to keep copies offsite.  But I can do better than
    that because I already have a web host, and I have Git.  I need to back up
    a little.
 
&lt;p&gt; I noticed that almost everything I was backing up fell into one of three
    categories:

&lt;ol&gt; 
  &lt;li&gt; Files I keep under version control.
       
  &lt;li&gt; Files (mostly large ones, like audio recordings) that never change
       after they've been created -- recordings of past concerts, my
       collection of ripped CDs, the masters for my CD, and so on.  I
       accumulate &lt;em&gt;more&lt;/em&gt; of them as time goes by, but most of the old
       ones stick around.
       
  &lt;li&gt; Files I can reconstruct, or that are purely ephemeral -- my browser
       cache, build products like PDFs, executable code, downloaded install
       CDs, and of course entire OS, which I can re-install any time I need to
       in under an hour.
&lt;/li&gt;&lt;/li&gt;&lt;/li&gt;&lt;/ol&gt;

&lt;p&gt; Git's biggest advantage for both version control and backups is that it's
    distributed -- each working directory has its own repository, and you can
    have shared repositories as well.  In effect, every repository is a
    backup.  In my case the shared repositories are in the cloud on &lt;a href="https://dreamhost.com/"&gt;Dreamhost&lt;/a&gt;, my web host.  There are
    working trees on Nova (the file server) and on one or more laptops.  A few
    of the more interesting ones have public copies on GitLab and/or GitHub as
    well.  So that takes care of Group 1.

&lt;p&gt; The main reason for using incremental backup or version control is so that
    you can go back to earlier versions of something if it gets messed up.
    But the files in group &lt;em&gt;don't&lt;/em&gt; change, they just accumulate.
    So I put all of the files in Group 2 -- the big ones -- into
    the same directory tree as the Git working trees; the only difference is
    that they don't have an associated Git repo.  I keep thinking I should set
    up &lt;a href="https://git-annex.branchable.com/"&gt;git-annex&lt;/a&gt; to manage
    them, but it doesn't seem necessary.  The workflow is very similar to the
    Git workflow:  add something (typically on a laptop), then push it to a
    shared server.  The Rsync commands are in a Makefile, so I don't have to
    remember them: I just &lt;code&gt;make&amp;nbsp;rsync&lt;/code&gt;.  (Rsync doesn't copy
    anything that is already at the destination and hasn't changed since the
    previous run, and by  default it ignores files on the destination that
    don't have corresponding source files.  So I don't have to have a
    &lt;em&gt;complete&lt;/em&gt; copy of my concert recordings (for example) on my
    laptop, just the one I just made.)

&lt;p&gt; That leaves Group 3 -- the files that don't have to be backed up because
    they can be reconstructed from version-controlled sources.  All of my
    working trees include a Makefile -- in most cases it's a link to &lt;a href="https://gitlab.com/ssavitzky/MakeStuff"&gt;MakeStuff&lt;/a&gt;/Makefile --
    that builds and installs whatever that tree needs.  Programs, web pages,
    songbooks, what have you.  Initial setup of a new machine is done by a
    package called &lt;a href="https://gitlab.com/ssavitzky/Honu"&gt;Honu&lt;/a&gt;
    (Hawaiian for the green sea turtle), which I described a little over a
    year ago in &lt;a href="https://mdlbear.dreamwidth.org/1688029.html"&gt;Sable
    and the turtles:  laptop configuration made easy&lt;/a&gt;.

&lt;p&gt; The end result is that "backups" are basically a side-effect of the way I
    normally work, with frequent small commits that are pushed almost
    immediately to a shared repo on Dreamhost.  The workflow for large files,
    especially recording projects, is similar, working on my laptop and
    backing up with Rsync to the file server as I go along.  When things are
    ready, they go up to the web host.  Make targets &lt;code&gt;push&lt;/code&gt; and
    &lt;code&gt;rsync&lt;/code&gt; simplify the process.  Going in the opposite direction,
    the &lt;a href="https://gitlab.com/ssavitzky/MakeStuff/-/blob/master/scripts/pull-all"&gt;pull-all&lt;/a&gt; command updates everything from the shared repos.

&lt;p&gt; Your mileage may vary.

&lt;h3&gt;Resources and references&lt;/h3&gt;
&lt;ul class="resource-list"&gt;
  &lt;li&gt; &lt;a href="https://mirrors.edge.kernel.org/pub/software/scm/git/docs/git.html"&gt;git(1) manual page&lt;/a&gt;
  &lt;li&gt; &lt;a href="https://rsync.samba.org/documentation.html"&gt;rsync documentation&lt;/a&gt;
  &lt;li&gt; &lt;a href="https://gitlab.com/ssavitzky/Honu"&gt;Honu&lt;/a&gt;
  &lt;li&gt; &lt;a href="https://stephen.savitzky.net/Doc/Linux/keeping-backups/"&gt;Keeping
       Backups&lt;/a&gt; (2006)
&lt;/li&gt;&lt;/li&gt;&lt;/li&gt;&lt;/li&gt;&lt;/ul&gt;

&lt;p class="colophon"&gt; &lt;em&gt;Another fine post from
   &lt;a href="https://mdlbear.dreamwidth.org/tag/curmudgeon"&gt;The Computer Curmudgeon&lt;/a&gt; (also at
   &lt;a href="https://computer-curmudgeon.com/"&gt;computer-curmudgeon.com&lt;/a&gt;).&lt;br&gt;
   Donation buttons in &lt;a href="https://mdlbear.dreamwidth.org/"&gt;profile&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;&lt;/p&gt;&lt;/p&gt;&lt;/p&gt;&lt;/p&gt;&lt;/p&gt;&lt;/p&gt;&lt;/p&gt;&lt;/p&gt;&lt;/p&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;img src="https://www.dreamwidth.org/tools/commentcount?user=mdlbear&amp;ditemid=1742138" width="30" height="12" alt="comment count unavailable" style="vertical-align: middle;"/&gt; comments</content>
  </entry>
  <entry>
    <id>tag:dreamwidth.org,2010-04-27:505737:1650080</id>
    <link rel="alternate" type="text/html" href="https://mdlbear.dreamwidth.org/1650080.html"/>
    <link rel="self" type="text/xml" href="https://mdlbear.dreamwidth.org/data/atom/?itemid=1650080"/>
    <title>More from the rabbit-hole</title>
    <published>2018-12-11T18:01:57Z</published>
    <updated>2018-12-11T18:01:57Z</updated>
    <category term="backups"/>
    <category term="meta"/>
    <category term="tumbling-down"/>
    <category term="tumblr"/>
    <category term="blogging"/>
    <dw:mood>meta</dw:mood>
    <dw:security>public</dw:security>
    <dw:reply-count>3</dw:reply-count>
    <content type="html">&lt;p&gt; Following up on &lt;a href="https://mdlbear.dreamwidth.org/1649182.html"&gt;mdlbear | Welcome, tumblr refugees&lt;/a&gt;:  this might otherwise have just
    been a longish section of next Sunday's "done" post, but the Tumblr
    apocalypse (tumbling-down?) is happening &lt;em&gt;now&lt;/em&gt; and I wanted to get
    &lt;a href="https://paste2.org/3cwm4MxJ"&gt;tumblr_backup.py&lt;/a&gt; out there.
    (It's a tumblr backup script, via &lt;a href="https://greywash.tumblr.com/post/180779871852/greywash-so-the-original-post-about-the-greymask"&gt;this tumblr post by greywash&lt;/a&gt;, who notes that the original post by
    Greymask has disappeared).  I think some of my readers will find it
    useful.

&lt;p&gt; It's also worth noting &lt;a href="https://greywash.dreamwidth.org/46038.html"&gt;greywash | State of the
    Migration: On fannish archival catastrophes, and what happens next&lt;/a&gt; (by
    way of &lt;a href="https://ysabetwordsmith.dreamwidth.org/11647191.html"&gt;ysabetwordsmith&lt;/a&gt;; I saw this someplace else last week, but apparently
    didn't log it.)

&lt;p&gt; More meta stuff:

&lt;ul&gt;
  &lt;li&gt; a remark by &lt;a href="http://dragon-in-a-fez.tumblr.com/post/181000026186/apricops-apricops-its-quite-likely-no"&gt;apricops: "It’s quite likely no...&lt;/a&gt; coincidence that that most
    ‘mismanaged’ and least profitable social media site is also the one that
    turned out to be most amenable to the formation of actual communities"
  &lt;li&gt; &lt;a href="https://pangodillo.dreamwidth.org/641.html"&gt;pangodillo | What
    Dreamwidth lacks&lt;/a&gt; is the ability to use tags as "whisperspace".
&lt;/li&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/p&gt;&lt;/p&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;img src="https://www.dreamwidth.org/tools/commentcount?user=mdlbear&amp;ditemid=1650080" width="30" height="12" alt="comment count unavailable" style="vertical-align: middle;"/&gt; comments</content>
  </entry>
  <entry>
    <id>tag:dreamwidth.org,2010-04-27:505737:1502902</id>
    <link rel="alternate" type="text/html" href="https://mdlbear.dreamwidth.org/1502902.html"/>
    <link rel="self" type="text/xml" href="https://mdlbear.dreamwidth.org/data/atom/?itemid=1502902"/>
    <title>Done recently (20130910 Tu - 0915 Su)</title>
    <published>2013-09-17T04:59:39Z</published>
    <updated>2013-09-17T04:59:39Z</updated>
    <category term="backups"/>
    <category term="services"/>
    <category term="health"/>
    <category term="done"/>
    <category term="starport"/>
    <category term="computers"/>
    <dw:mood>calm</dw:mood>
    <dw:security>public</dw:security>
    <dw:reply-count>5</dw:reply-count>
    <content type="html">&lt;p&gt; Tried to log in on my file server last week and found out that the hard
    drive was dead.  Finally went to Fry's yesterday, and bought a couple of
    Western Digital red (NAS) 2TB drives.  Designed for continuous duty, which
    would be a good thing.  Disassembled the lock on the docking bay I had the
    backup drive in (and promptly found the key, lurking in what had been my
    nightstand).  
&lt;/p&gt;
&lt;p&gt; Confirmed that the backup works and the old main drive doesn't, and
    installed the latest Debian.  Which only took about an hour.  It boots
    fast as a bat, and ships with a driver for the Realtek ethernet controller
    on my motherboard.  So I can free up the PCI slot for something more
    useful, like maybe an ESATA/USB-3 card, if I can find one.  
&lt;/p&gt;
&lt;p&gt; Now begins the tedious process of restoring (done, as of this evening) and
    reconfiguring.  Which will take time because I want to make some
    long-overdue changes in the config.  
&lt;/p&gt;
&lt;p&gt; It looks like the last time a backup was made was June 25th.  I don't
    *think* I did much, if anything, since then except maybe add a couple of
    passwords to the keychain.  And of course I've lost a lot of email.  If
    you sent anything to steve at thestarport.org in the last couple of
    months, I haven't seen it.  (It is now forwarded to my gmail account,
    along with steve at savitzky.net which I've been doing pretty well at
    keeping up with.)
&lt;/p&gt;
&lt;p&gt; It's possible that some of the transient stuff can be rescued from the old
    drive -- it seems to run ok for a few minutes before suddenly going
    offline.  Not entirely clear that it's worth bothering with.
&lt;/p&gt;
&lt;p&gt; Apart from that...  Colleen has been getting physical therapy three
    times/week, and is now able to stand up and transfer into her power
    chair.  Progress.  Her caregiver is an excellent cook -- Thai, Chinese,
    and Japanese, with an emphasis on lean and low sodium.  Yum!
&lt;/p&gt;
&lt;p&gt; Links in the notes, as usual.  One, found by a coworker after I'd
    mentioned something to that effect, is one of my favorite stats: &lt;a href="http://www.electronista.com/articles/11/05/10/ipad.2.benches.as.fast.as.cray.2.from.1985/"&gt;iPad 2 as fast as Cray 2 supercomputer&lt;/a&gt;.  I also dropped a donation on
    &lt;a href="http://ysabetwordsmith.livejournal.com/2953055.html"&gt;YsabetWordsmith's poem, "Part of Who I Am"&lt;/a&gt;.  Some great links
    &lt;em&gt;there,&lt;/em&gt; too.
&lt;/p&gt;
&lt;span class="cut-wrapper"&gt;&lt;span style="display: none;" id="span-cuttag___1" class="cuttag"&gt;&lt;/span&gt;&lt;b class="cut-open"&gt;(&amp;nbsp;&lt;/b&gt;&lt;b class="cut-text"&gt;&lt;a href="https://mdlbear.dreamwidth.org/1502902.html#cutid1"&gt;raw notes&lt;/a&gt;&lt;/b&gt;&lt;b class="cut-close"&gt;&amp;nbsp;)&lt;/b&gt;&lt;/span&gt;&lt;div style="display: none;" id="div-cuttag___1" aria-live="assertive"&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;img src="https://www.dreamwidth.org/tools/commentcount?user=mdlbear&amp;ditemid=1502902" width="30" height="12" alt="comment count unavailable" style="vertical-align: middle;"/&gt; comments</content>
  </entry>
</feed>
