<?xml version="1.0"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0">
  <channel>
    <title>CRIN Trac: Ticket #39: S3QL backup problems</title>
    <link>https://trac.crin.org/trac/ticket/39</link>
    <description>&lt;p&gt;
Often backups fail during the rsync with "Transport endpoint is not connected".
&lt;/p&gt;
&lt;p&gt;
The S3QL &lt;a class="wiki" href="https://trac.crin.org/trac/wiki/Crin3"&gt;Crin3&lt;/a&gt; backup script mounts on &lt;tt&gt;/tmp&lt;/tt&gt; but the other scripts don't so where there is some issue the unmount don't work as the S3QL system is mounted in an unknown location, see &lt;a class="closed ticket" href="https://trac.crin.org/trac/ticket/35" title="defect: Problem with the S3QL backups for Crin1 (closed: fixed)"&gt;ticket:35&lt;/a&gt;. [SOLVED]
&lt;/p&gt;
&lt;p&gt;
There are also some unneeded scripts in &lt;tt&gt;/usr/local/bin&lt;/tt&gt; on &lt;a class="wiki" href="https://trac.crin.org/trac/wiki/Crin3"&gt;Crin3&lt;/a&gt; which need removing to make things less confusing. [SOLVED]
&lt;/p&gt;
</description>
    <language>en-us</language>
    <image>
      <title>CRIN Trac</title>
      <url>https://trac.crin.org/trac/chrome/site/logo.gif</url>
      <link>https://trac.crin.org/trac/ticket/39</link>
    </image>
    <generator>Trac 1.0.2</generator>
    <item>
      
        <dc:creator>chris</dc:creator>

      <pubDate>Wed, 07 Oct 2015 13:48:45 GMT</pubDate>
      <title>hours, priority changed; totalhours set</title>
      <link>https://trac.crin.org/trac/ticket/39#comment:1</link>
      <guid isPermaLink="false">https://trac.crin.org/trac/ticket/39#comment:1</guid>
      <description>
          &lt;ul&gt;
            &lt;li&gt;&lt;strong&gt;hours&lt;/strong&gt;
                changed from &lt;em&gt;0&lt;/em&gt; to &lt;em&gt;0.25&lt;/em&gt;
            &lt;/li&gt;
            &lt;li&gt;&lt;strong&gt;priority&lt;/strong&gt;
                changed from &lt;em&gt;minor&lt;/em&gt; to &lt;em&gt;critical&lt;/em&gt;
            &lt;/li&gt;
            &lt;li&gt;&lt;strong&gt;totalhours&lt;/strong&gt;
                set to &lt;em&gt;0.25&lt;/em&gt;
            &lt;/li&gt;
          &lt;/ul&gt;
        &lt;p&gt;
This really needs fixing, at the moment what needs doing when there is an error is finding the not-properly-unmounted file system with a &lt;tt&gt;df -h&lt;/tt&gt; and it shows up as something like:
&lt;/p&gt;
&lt;pre class="wiki"&gt;df: ‘/tmp/s3ql_backup_9276’: Transport endpoint is not connected
&lt;/pre&gt;&lt;p&gt;
Then use fuse to unmount it and then manually mount again, eg:
&lt;/p&gt;
&lt;pre class="wiki"&gt;fusermount -u /tmp/s3ql_backup_9276
mnt-s3ql crin1
&lt;/pre&gt;
      </description>
      <category>Ticket</category>
    </item><item>
      
        <dc:creator>chris</dc:creator>

      <pubDate>Thu, 08 Oct 2015 12:59:00 GMT</pubDate>
      <title>hours, totalhours changed</title>
      <link>https://trac.crin.org/trac/ticket/39#comment:2</link>
      <guid isPermaLink="false">https://trac.crin.org/trac/ticket/39#comment:2</guid>
      <description>
          &lt;ul&gt;
            &lt;li&gt;&lt;strong&gt;hours&lt;/strong&gt;
                changed from &lt;em&gt;0&lt;/em&gt; to &lt;em&gt;2&lt;/em&gt;
            &lt;/li&gt;
            &lt;li&gt;&lt;strong&gt;totalhours&lt;/strong&gt;
                changed from &lt;em&gt;0.25&lt;/em&gt; to &lt;em&gt;2.25&lt;/em&gt;
            &lt;/li&gt;
          &lt;/ul&gt;
        &lt;p&gt;
I have updated the scripts for mounting, un-mounting and backing up s3ql filesystems and updated the wiki pages, &lt;a class="wiki" href="https://trac.crin.org/trac/wiki/S3QLMnt"&gt;wiki:S3QLMnt&lt;/a&gt; and &lt;a class="wiki" href="https://trac.crin.org/trac/wiki/S3QLBackup"&gt;wiki:S3QLBackup&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
I have raised an issue with the &lt;a class="wiki" href="https://trac.crin.org/trac/wiki/Crin1"&gt;Crin1&lt;/a&gt; backup on &lt;a class="ext-link" href="https://groups.google.com/forum/?_escaped_fragment_=topic/s3ql/A5q_DRzZ2BA#!topic/s3ql/A5q_DRzZ2BA"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;the s3ql email list&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;
I have updated the crontab on &lt;a class="wiki" href="https://trac.crin.org/trac/wiki/Crin3"&gt;Crin3&lt;/a&gt;:
&lt;/p&gt;
&lt;pre class="wiki"&gt;01 01 * * * /usr/local/bin/umnt-s3ql crin1 ; /usr/local/bin/mnt-s3ql crin1 ; /usr/local/bin/umnt-sshfs crin1 ; /usr/local/bin/mnt-sshfs crin1 ; /usr/local/bin/s3ql_backup crin1
01 03 * * * /usr/local/bin/umnt-s3ql crin2 ; /usr/local/bin/mnt-s3ql crin2 ; /usr/local/bin/umnt-sshfs crin2 ; /usr/local/bin/mnt-sshfs crin2 ; /usr/local/bin/s3ql_backup crin2
01 05 * * * /usr/local/bin/umnt-s3ql crin4 ; /usr/local/bin/mnt-s3ql crin4 ; /usr/local/bin/umnt-sshfs crin4 ; /usr/local/bin/mnt-sshfs crin4 ; /usr/local/bin/s3ql_backup crin4
&lt;/pre&gt;&lt;p&gt;
But this could do with further improvement to do thinks like check if a forced filesystem check is needed and only unmount and re-mount things if needed.
&lt;/p&gt;
      </description>
      <category>Ticket</category>
    </item><item>
      
        <dc:creator>chris</dc:creator>

      <pubDate>Thu, 08 Oct 2015 16:29:50 GMT</pubDate>
      <title>hours, totalhours changed</title>
      <link>https://trac.crin.org/trac/ticket/39#comment:3</link>
      <guid isPermaLink="false">https://trac.crin.org/trac/ticket/39#comment:3</guid>
      <description>
          &lt;ul&gt;
            &lt;li&gt;&lt;strong&gt;hours&lt;/strong&gt;
                changed from &lt;em&gt;0&lt;/em&gt; to &lt;em&gt;0.37&lt;/em&gt;
            &lt;/li&gt;
            &lt;li&gt;&lt;strong&gt;totalhours&lt;/strong&gt;
                changed from &lt;em&gt;2.25&lt;/em&gt; to &lt;em&gt;2.62&lt;/em&gt;
            &lt;/li&gt;
          &lt;/ul&gt;
        &lt;p&gt;
I have raised the issue with the &lt;a class="wiki" href="https://trac.crin.org/trac/wiki/Crin1"&gt;Crin1&lt;/a&gt; backup as &lt;a class="ext-link" href="https://bitbucket.org/nikratio/s3ql/issues/167/error-when-running-file-system-check"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;a ticket&lt;/a&gt;.
&lt;/p&gt;
      </description>
      <category>Ticket</category>
    </item><item>
      
        <dc:creator>chris</dc:creator>

      <pubDate>Fri, 09 Oct 2015 12:34:11 GMT</pubDate>
      <title>hours, totalhours changed</title>
      <link>https://trac.crin.org/trac/ticket/39#comment:4</link>
      <guid isPermaLink="false">https://trac.crin.org/trac/ticket/39#comment:4</guid>
      <description>
          &lt;ul&gt;
            &lt;li&gt;&lt;strong&gt;hours&lt;/strong&gt;
                changed from &lt;em&gt;0&lt;/em&gt; to &lt;em&gt;0.5&lt;/em&gt;
            &lt;/li&gt;
            &lt;li&gt;&lt;strong&gt;totalhours&lt;/strong&gt;
                changed from &lt;em&gt;2.62&lt;/em&gt; to &lt;em&gt;3.12&lt;/em&gt;
            &lt;/li&gt;
          &lt;/ul&gt;
        &lt;p&gt;
I have followed up the ticket with &lt;a class="ext-link" href="https://bitbucket.org/nikratio/s3ql/issues/167/error-when-running-file-system-check#comment-22354267"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;more details&lt;/a&gt; as &lt;a class="ext-link" href="https://groups.google.com/forum/?_escaped_fragment_=msg/s3ql/A5q_DRzZ2BA/oSa60M7MCQAJ#!msg/s3ql/A5q_DRzZ2BA/oSa60M7MCQAJ"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;requested on the email list&lt;/a&gt;.
&lt;/p&gt;
      </description>
      <category>Ticket</category>
    </item><item>
      
        <dc:creator>chris</dc:creator>

      <pubDate>Tue, 13 Oct 2015 12:00:42 GMT</pubDate>
      <title>hours, totalhours changed</title>
      <link>https://trac.crin.org/trac/ticket/39#comment:5</link>
      <guid isPermaLink="false">https://trac.crin.org/trac/ticket/39#comment:5</guid>
      <description>
          &lt;ul&gt;
            &lt;li&gt;&lt;strong&gt;hours&lt;/strong&gt;
                changed from &lt;em&gt;0&lt;/em&gt; to &lt;em&gt;0.5&lt;/em&gt;
            &lt;/li&gt;
            &lt;li&gt;&lt;strong&gt;totalhours&lt;/strong&gt;
                changed from &lt;em&gt;3.12&lt;/em&gt; to &lt;em&gt;3.62&lt;/em&gt;
            &lt;/li&gt;
          &lt;/ul&gt;
        &lt;p&gt;
Posted &lt;a class="ext-link" href="https://bitbucket.org/nikratio/s3ql/issues/167/error-when-running-file-system-check#comment-22436492"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;a response on the ticket last night&lt;/a&gt; and I have updated the backup crontab on &lt;a class="wiki" href="https://trac.crin.org/trac/wiki/Crin3"&gt;Crin3&lt;/a&gt; to:
&lt;/p&gt;
&lt;pre class="wiki"&gt;01 01 * * * /usr/local/bin/mnt-s3ql crin1 &amp;amp;&amp;amp; /usr/local/bin/mnt-sshfs crin1 &amp;amp;&amp;amp; /usr/local/bin/s3ql_backup crin1 &amp;amp;&amp;amp; /usr/local/bin/umnt-s3ql crin1 &amp;amp;&amp;amp; /usr/local/bin/umnt-sshfs crin1
02 03 * * * /usr/local/bin/mnt-s3ql crin2 &amp;amp;&amp;amp; /usr/local/bin/mnt-sshfs crin2 &amp;amp;&amp;amp; /usr/local/bin/s3ql_backup crin2 &amp;amp;&amp;amp; /usr/local/bin/umnt-s3ql crin2 &amp;amp;&amp;amp; /usr/local/bin/umnt-sshfs crin2
03 05 * * * /usr/local/bin/mnt-s3ql crin4 &amp;amp;&amp;amp; /usr/local/bin/mnt-sshfs crin4 &amp;amp;&amp;amp; /usr/local/bin/s3ql_backup crin4 &amp;amp;&amp;amp; /usr/local/bin/umnt-s3ql crin4 &amp;amp;&amp;amp; /usr/local/bin/umnt-sshfs crin4
&lt;/pre&gt;
      </description>
      <category>Ticket</category>
    </item><item>
      
        <dc:creator>chris</dc:creator>

      <pubDate>Wed, 14 Oct 2015 14:05:26 GMT</pubDate>
      <title>hours, totalhours changed</title>
      <link>https://trac.crin.org/trac/ticket/39#comment:6</link>
      <guid isPermaLink="false">https://trac.crin.org/trac/ticket/39#comment:6</guid>
      <description>
          &lt;ul&gt;
            &lt;li&gt;&lt;strong&gt;hours&lt;/strong&gt;
                changed from &lt;em&gt;0&lt;/em&gt; to &lt;em&gt;4&lt;/em&gt;
            &lt;/li&gt;
            &lt;li&gt;&lt;strong&gt;totalhours&lt;/strong&gt;
                changed from &lt;em&gt;3.62&lt;/em&gt; to &lt;em&gt;7.62&lt;/em&gt;
            &lt;/li&gt;
          &lt;/ul&gt;
        &lt;p&gt;
I have added a lot of error checking to the scripts and sorted out the exit codes, see &lt;a class="wiki" href="https://trac.crin.org/trac/wiki/SshfsMnt"&gt;wiki:SshfsMnt&lt;/a&gt; and &lt;a class="wiki" href="https://trac.crin.org/trac/wiki/S3QLMnt"&gt;wiki:S3QLMnt&lt;/a&gt; and I have changed the &lt;a class="wiki" href="https://trac.crin.org/trac/wiki/S3QLBackup"&gt;wiki:S3QLBackup&lt;/a&gt; script so it calls the others and the crontab has been updated to:
&lt;/p&gt;
&lt;pre class="wiki"&gt;# m h  dom mon dow   command
01 01 * * * /usr/local/bin/s3ql_backup crin1
02 03 * * * /usr/local/bin/s3ql_backup crin2
03 05 * * * /usr/local/bin/s3ql_backup crin4
&lt;/pre&gt;&lt;p&gt;
s3ql and lots of other packages have been upgraded, there is this issue:
&lt;/p&gt;
&lt;pre class="wiki"&gt;The following NEW packages will be installed:
  cpp-5{a} distro-info-data{a} gcc-5{a} libapt-inst1.7{a} libapt-pkg4.16{a} libasan2{a}
  libb-hooks-endofscope-perl{a} libb-hooks-op-check-perl{a} libbareword-filehandles-perl{a}
  libboost-iostreams1.58.0{a} libcc1-0{a} libclass-method-modifiers-perl{a} libclass-xsaccessor-perl{a}
  libcpan-changes-perl{a} libcwidget3v5{a} libdata-perl-perl{a} libdevel-caller-perl{a}
  libdevel-globaldestruction-perl{a} libdevel-lexalias-perl{a} libfile-slurp-perl{a} libgcc-5-dev{a}
  libgetopt-long-descriptive-perl{a} libicu55{a} libimport-into-perl{a} libindirect-perl{a} libio-stringy-perl{a}
  liblexical-sealrequirehints-perl{a} liblvm2app2.2{a} libmodule-implementation-perl{a} libmodule-runtime-perl{a}
  libmoo-perl{a} libmoox-handlesvia-perl{a} libmpx0{a} libmultidimensional-perl{a} libnamespace-autoclean-perl{a}
  libnamespace-clean-perl{a} libnghttp2-14{a} libpackage-stash-perl{a} libpackage-stash-xs-perl{a}
  libpadwalker-perl{a} libparams-classify-perl{a} libparams-validate-perl{a} libpath-tiny-perl{a}
  libpod-markdown-perl{a} librole-tiny-perl{a} libsigc++-2.0-0v5{ab} libstrictures-perl{a}
  libsub-exporter-progressive-perl{a} libsub-identify-perl{a} libsys-meminfo-perl{a} libtry-tiny-perl{a}
  libtype-tiny-perl{a} libtype-tiny-xs-perl{a} libunicode-utf8-perl{a} libvariable-magic-perl{a} libxapian22v5{a}
  linux-image-4.2.0-1-amd64{a} python-httplib2{a} python-pycurl{a} python-pysimplesoap{a}
The following packages will be REMOVED:
  libcwidget3{u} libregexp-common-perl{u} libxapian22{u} python-defusedxml{u} python-soappy{u} python-wstools{u}
The following packages have unmet dependencies:
 libsigc++-2.0-0v5 : Conflicts: libsigc++-2.0-0c2a but 2.4.1-1 is installed.
The following actions will resolve these dependencies:
     Remove the following packages:
1)     aptitude
     Keep the following packages at their current version:
2)     libcwidget3v5 [Not Installed]
3)     libsigc++-2.0-0v5 [Not Installed]
     Leave the following dependencies unresolved:
4)     aptitude-common recommends aptitude
Accept this solution? [Y/n/q/?] q
&lt;/pre&gt;&lt;p&gt;
But I think that can wait, &lt;tt&gt;s3ql&lt;/tt&gt; has been updated:
&lt;/p&gt;
&lt;pre class="wiki"&gt;s3ql (2.14+dfsg-1) unstable; urgency=medium
  The internal file system revision has changed. File systems created
  with S3QL 2.14 or newer are not compatible with prior S3QL
  versions. To update an existing file system to the newest revision,
  use the 's3qladm upgrade' command.
 -- Nikolaus Rath &amp;lt;Nikolaus@rath.org&amp;gt;  Wed, 12 Aug 2015 14:57:22 -0700
&lt;/pre&gt;&lt;p&gt;
So these needed to be run:
&lt;/p&gt;
&lt;pre class="wiki"&gt;s3qladm upgrade s3c://s.qstack.advania.com:443/crin4/
s3qladm upgrade s3c://s.qstack.advania.com:443/crin2/
&lt;/pre&gt;&lt;p&gt;
The &lt;a class="ext-link" href="https://bitbucket.org/nikratio/s3ql/issues/167/error-when-running-file-system-check#comment-22474592"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;bug has been fixed&lt;/a&gt;, I need to check when a new version of &lt;tt&gt;s3ql&lt;/tt&gt; with the fix will be added to Debian.
&lt;/p&gt;
      </description>
      <category>Ticket</category>
    </item><item>
      
        <dc:creator>chris</dc:creator>

      <pubDate>Thu, 15 Oct 2015 09:01:13 GMT</pubDate>
      <title>hours, totalhours changed</title>
      <link>https://trac.crin.org/trac/ticket/39#comment:7</link>
      <guid isPermaLink="false">https://trac.crin.org/trac/ticket/39#comment:7</guid>
      <description>
          &lt;ul&gt;
            &lt;li&gt;&lt;strong&gt;hours&lt;/strong&gt;
                changed from &lt;em&gt;0&lt;/em&gt; to &lt;em&gt;0.25&lt;/em&gt;
            &lt;/li&gt;
            &lt;li&gt;&lt;strong&gt;totalhours&lt;/strong&gt;
                changed from &lt;em&gt;7.62&lt;/em&gt; to &lt;em&gt;7.87&lt;/em&gt;
            &lt;/li&gt;
          &lt;/ul&gt;
        &lt;p&gt;
The backups failed last night as I forgot that &lt;tt&gt;/usr/local/bin&lt;/tt&gt; isn't in the &lt;tt&gt;$PATH&lt;/tt&gt; for cron, so I have &lt;a class="wiki" href="https://trac.crin.org/trac/wiki/S3QLBackup?action=diff&amp;amp;version=7"&gt;amended the script&lt;/a&gt; to fix this.
&lt;/p&gt;
&lt;p&gt;
I have also &lt;a class="ext-link" href="https://bitbucket.org/nikratio/s3ql/issues/167/error-when-running-file-system-check#comment-22514075"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;asked when the fix will be available in Debian unstable&lt;/a&gt;.
&lt;/p&gt;
      </description>
      <category>Ticket</category>
    </item><item>
      
        <dc:creator>chris</dc:creator>

      <pubDate>Fri, 16 Oct 2015 11:17:33 GMT</pubDate>
      <title>hours, totalhours changed</title>
      <link>https://trac.crin.org/trac/ticket/39#comment:8</link>
      <guid isPermaLink="false">https://trac.crin.org/trac/ticket/39#comment:8</guid>
      <description>
          &lt;ul&gt;
            &lt;li&gt;&lt;strong&gt;hours&lt;/strong&gt;
                changed from &lt;em&gt;0&lt;/em&gt; to &lt;em&gt;0.5&lt;/em&gt;
            &lt;/li&gt;
            &lt;li&gt;&lt;strong&gt;totalhours&lt;/strong&gt;
                changed from &lt;em&gt;7.87&lt;/em&gt; to &lt;em&gt;8.37&lt;/em&gt;
            &lt;/li&gt;
          &lt;/ul&gt;
        &lt;p&gt;
Nikolaus has &lt;a class="ext-link" href="https://bitbucket.org/nikratio/s3ql/issues/167/error-when-running-file-system-check#comment-22529355"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;replied&lt;/a&gt; regarding when a new version of &lt;tt&gt;s3ql&lt;/tt&gt; might be available:
&lt;/p&gt;
&lt;blockquote class="citation"&gt;
&lt;p&gt;
That might be a while, it's really unlikely to happen so I don't want to make a release just because of this. However, you should be able to apply the above patch to your S3QL 2.13 installation (only the changes to fsck.py are important, you don't need to patch the t3_fsck.py or Changes.rst file).
&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;
So the &lt;a class="ext-link" href="https://bitbucket.org/nikratio/s3ql/commits/79a95415c11e"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;diff is here&lt;/a&gt;, the &lt;a class="ext-link" href="https://bitbucket.org/nikratio/s3ql/src/79a95415c11e0bd199225c0e4a585a5ac183aef2/src/s3ql/fsck.py"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;file is here&lt;/a&gt; so, on &lt;a class="wiki" href="https://trac.crin.org/trac/wiki/Crin3"&gt;Crin3&lt;/a&gt;:
&lt;/p&gt;
&lt;pre class="wiki"&gt;locate fsck.py
/usr/lib/s3ql/s3ql/fsck.py
/usr/lib/s3ql/s3ql/fsck.py.orig
&lt;/pre&gt;&lt;p&gt;
So I must have manually patched this file in the past (it'll be documented on a ticket somewhere), but the last Debian update would have clobbered that change.
&lt;/p&gt;
&lt;pre class="wiki"&gt;cd
wget https://bitbucket.org/nikratio/s3ql/raw/79a95415c11e0bd199225c0e4a585a5ac183aef2/src/s3ql/fsck.py
diff fsck.py /usr/lib/s3ql/s3ql/fsck.py
&lt;/pre&gt;&lt;p&gt;
This is the diff:
&lt;/p&gt;
&lt;pre class="wiki"&gt;2c2
&amp;lt; fsck.py - this file is part of S3QL.
---
&amp;gt; fsck.py - this file is part of S3QL (http://s3ql.googlecode.com)
6c6
&amp;lt; This work can be distributed under the terms of the GNU GPLv3.
---
&amp;gt; This program can be distributed under the terms of the GNU GPLv3.
649,650c649,650
&amp;lt;         for (block_id, obj_id) in list(self.conn.query('SELECT id, obj_id FROM blocks '
&amp;lt;                                                        'WHERE hash IS NULL')):
---
&amp;gt;         for (block_id, obj_id) in self.conn.query('SELECT id, obj_id FROM blocks '
&amp;gt;                                                   'WHERE hash IS NULL'):
652,658c652
&amp;lt;
&amp;lt;             # This should only happen when there was an error during upload,
&amp;lt;             # so the object must not have been stored correctly. We cannot
&amp;lt;             # just recalculate the hash for the block, because then we may
&amp;lt;             # be modifying the contents of the inode that refers to this
&amp;lt;             # block.
&amp;lt;             self.log_error("No checksum for block %d, removing from table...", block_id)
---
&amp;gt;             self.log_error("No cached checksum for block %d, recomputing...", block_id)
664,665c658,669
&amp;lt;             self.conn.execute('DELETE FROM blocks WHERE id=?', (block_id,))
&amp;lt;             self.conn.execute('DELETE FROM objects WHERE id=?', (obj_id,))
---
&amp;gt;             def do_read(fh):
&amp;gt;                 sha = hashlib.sha256()
&amp;gt;                 while True:
&amp;gt;                     buf = fh.read(BUFSIZE)
&amp;gt;                     if not buf:
&amp;gt;                         break
&amp;gt;                     sha.update(buf)
&amp;gt;                 return sha.digest()
&amp;gt;             hash_ = self.backend.perform_read(do_read, "s3ql_data_%d" % obj_id)
&amp;gt;
&amp;gt;             self.conn.execute('UPDATE blocks SET hash=? WHERE id=?',
&amp;gt;                               (hash_, block_id))
&lt;/pre&gt;&lt;p&gt;
Moving the old file and replacing it with the new one (to save patching):
&lt;/p&gt;
&lt;pre class="wiki"&gt;mv /usr/lib/s3ql/s3ql/fsck.py /usr/lib/s3ql/s3ql/fsck.py.2015-10-16
mv fsck.py /usr/lib/s3ql/s3ql/
&lt;/pre&gt;&lt;p&gt;
Test:
&lt;/p&gt;
&lt;pre class="wiki"&gt;mnt-s3ql crin1
Starting fsck of s3c://s.qstack.advania.com:443/crin1/
Using cached metadata.
Remote metadata is outdated.
Checking DB integrity...
Creating temporary extra indices...
Checking lost+found...
Checking cached objects...
Checking names (refcounts)...
Checking contents (names)...
Checking contents (inodes)...
Checking contents (parent inodes)...
Checking objects (reference counts)...
Checking objects (backend)...
..processed 112240 objects so far..
Checking objects (sizes)...
Checking blocks (referenced objects)...
Checking blocks (refcounts)...
Checking blocks (checksums)...
No checksum for block 113265, removing from table...
Checking inode-block mapping (blocks)...
Inode-block mapping for inode 2112665 refers to non-existing block 113265
File may lack data, moved to /lost+found: /lost+found/block-113265
Checking inode-block mapping (inodes)...
Checking inodes (refcounts)...
Checking inodes (sizes)...
Checking extended attributes (names)...
Checking extended attributes (inodes)...
Checking symlinks (inodes)...
Checking directory reachability...
Checking unix conventions...
Checking referential integrity...
Dropping temporary indices...
Dumping metadata...
..objects..
..blocks..
..inodes..
..inode_blocks..
..symlink_targets..
..names..
..contents..
..ext_attributes..
Compressing and uploading metadata...
Wrote 20.0 MiB of compressed metadata.
Cycling metadata backups...
Backing up old metadata...
Cleaning up local metadata...
Completed fsck of s3c://s.qstack.advania.com:443/crin1/
Filesystem check of s3c://s.qstack.advania.com:443/crin1 failed
&lt;/pre&gt;&lt;p&gt;
So running it again:
&lt;/p&gt;
&lt;pre class="wiki"&gt;mnt-s3ql crin1
Starting fsck of s3c://s.qstack.advania.com:443/crin1/
Using cached metadata.
File system is marked as clean. Use --force to force checking.
Filesystem check of s3c://s.qstack.advania.com:443/crin1 success
Using 2 upload threads (memory limited).
Autodetected 65498 file descriptors available for cache entries
Using cached metadata.
Setting cache size to 9031 MB
Mounting filesystem...
Mounting s3c://s.qstack.advania.com:443/crin1 on /media/s3ql/crin1 success
&lt;/pre&gt;&lt;p&gt;
So I have set off a manual backup.
&lt;/p&gt;
&lt;p&gt;
TODO: When a fsck fails the backup script should run it again with &lt;tt&gt;--force&lt;/tt&gt; and also I think some checks for the condition mentioned in &lt;a class="closed ticket" href="https://trac.crin.org/trac/ticket/39#comment:1" title="defect: S3QL backup problems (closed: fixed)"&gt;ticket:39#comment:1&lt;/a&gt; are needed.
&lt;/p&gt;
      </description>
      <category>Ticket</category>
    </item><item>
      
        <dc:creator>chris</dc:creator>

      <pubDate>Wed, 28 Oct 2015 10:25:08 GMT</pubDate>
      <title>hours, totalhours changed</title>
      <link>https://trac.crin.org/trac/ticket/39#comment:9</link>
      <guid isPermaLink="false">https://trac.crin.org/trac/ticket/39#comment:9</guid>
      <description>
          &lt;ul&gt;
            &lt;li&gt;&lt;strong&gt;hours&lt;/strong&gt;
                changed from &lt;em&gt;0&lt;/em&gt; to &lt;em&gt;4&lt;/em&gt;
            &lt;/li&gt;
            &lt;li&gt;&lt;strong&gt;totalhours&lt;/strong&gt;
                changed from &lt;em&gt;8.37&lt;/em&gt; to &lt;em&gt;12.37&lt;/em&gt;
            &lt;/li&gt;
          &lt;/ul&gt;
        &lt;p&gt;
Over the last 12 days I have been tweaking the backup and mounting scripts and they are more-or-less working properly, but need a little more error checking and then I'll update the documentation on the wiki for them.
&lt;/p&gt;
&lt;p&gt;
There are still problem with "Transport endpoint is not connected" errors half way through backups.
&lt;/p&gt;
      </description>
      <category>Ticket</category>
    </item><item>
      
        <dc:creator>chris</dc:creator>

      <pubDate>Tue, 03 Nov 2015 12:16:05 GMT</pubDate>
      <title>description, summary changed</title>
      <link>https://trac.crin.org/trac/ticket/39#comment:10</link>
      <guid isPermaLink="false">https://trac.crin.org/trac/ticket/39#comment:10</guid>
      <description>
          &lt;ul&gt;
            &lt;li&gt;&lt;strong&gt;description&lt;/strong&gt;
              modified (&lt;a href="/trac/ticket/39?action=diff&amp;amp;version=10"&gt;diff&lt;/a&gt;)
            &lt;/li&gt;
            &lt;li&gt;&lt;strong&gt;summary&lt;/strong&gt;
                changed from &lt;em&gt;S3QL backup script mount location&lt;/em&gt; to &lt;em&gt;S3QL backup problems&lt;/em&gt;
            &lt;/li&gt;
          &lt;/ul&gt;
      </description>
      <category>Ticket</category>
    </item><item>
      
        <dc:creator>chris</dc:creator>

      <pubDate>Tue, 03 Nov 2015 14:56:07 GMT</pubDate>
      <title>hours, totalhours changed</title>
      <link>https://trac.crin.org/trac/ticket/39#comment:11</link>
      <guid isPermaLink="false">https://trac.crin.org/trac/ticket/39#comment:11</guid>
      <description>
          &lt;ul&gt;
            &lt;li&gt;&lt;strong&gt;hours&lt;/strong&gt;
                changed from &lt;em&gt;0&lt;/em&gt; to &lt;em&gt;2.65&lt;/em&gt;
            &lt;/li&gt;
            &lt;li&gt;&lt;strong&gt;totalhours&lt;/strong&gt;
                changed from &lt;em&gt;12.37&lt;/em&gt; to &lt;em&gt;15.02&lt;/em&gt;
            &lt;/li&gt;
          &lt;/ul&gt;
        &lt;p&gt;
Often the &lt;a class="wiki" href="https://trac.crin.org/trac/wiki/Crin1"&gt;Crin1&lt;/a&gt; MySQL backup fails, it did last night, this happens during the rsync:
&lt;/p&gt;
&lt;pre class="wiki"&gt;mysql/databases/owncloud/oc_users.sql
mysql/databases/owncloud/oc_vcategory.sql
mysql/databases/owncloud/oc_vcategory_to_object.sql
rsync: write failed on "/media/s3ql/crin1/2015-11-03_00:22:26/var/backups/mysql/databases/dev/field_revision_body.sql": Transport endpoint is not connected (107)
rsync: stat "/media/s3ql/crin1/2015-11-03_00:22:26/var/backups/mysql/databases/dev/.field_revision_body.sql.dueMx3" failed: Transport endpoint is not connected (107)
rsync: rename "/media/s3ql/crin1/2015-11-03_00:22:26/var/backups/mysql/databases/dev/.field_revision_body.sql.dueMx3" -&amp;gt; "mysql/databases/dev/field_revision_body.sql": Transport endpoint is not connected (107)
rsync error: error in file IO (code 11) at receiver.c(393) [receiver=3.1.1]
Problem with rsync -aHAXx --delete-during --delete-excluded --partial -v /media/sshfs/crin1/var/backups/ /media/sshfs/crin1/2015-11-03_00:22:26/var/backups/
df: ‘/media/s3ql/crin1’: Transport endpoint is not connected
&lt;/pre&gt;&lt;p&gt;
So I have written a separate script to do this check, &lt;a class="wiki" href="https://trac.crin.org/trac/wiki/S3QLBackup#s3ql_endpoint_check"&gt;wiki:S3QLBackup#s3ql_endpoint_check&lt;/a&gt; and done some more work on the other scripts and these changes are now being tested...
&lt;/p&gt;
      </description>
      <category>Ticket</category>
    </item><item>
      
        <dc:creator>chris</dc:creator>

      <pubDate>Thu, 05 Nov 2015 11:01:28 GMT</pubDate>
      <title>hours, totalhours changed</title>
      <link>https://trac.crin.org/trac/ticket/39#comment:12</link>
      <guid isPermaLink="false">https://trac.crin.org/trac/ticket/39#comment:12</guid>
      <description>
          &lt;ul&gt;
            &lt;li&gt;&lt;strong&gt;hours&lt;/strong&gt;
                changed from &lt;em&gt;0&lt;/em&gt; to &lt;em&gt;0.5&lt;/em&gt;
            &lt;/li&gt;
            &lt;li&gt;&lt;strong&gt;totalhours&lt;/strong&gt;
                changed from &lt;em&gt;15.02&lt;/em&gt; to &lt;em&gt;15.52&lt;/em&gt;
            &lt;/li&gt;
          &lt;/ul&gt;
        &lt;p&gt;
The &lt;a class="wiki" href="https://trac.crin.org/trac/wiki/Crin1"&gt;Crin1&lt;/a&gt; backup failed again last night:
&lt;/p&gt;
&lt;pre class="wiki"&gt;mysql/databases/stage/webform_submitted_data.sql
rsync: write failed on "/media/s3ql/crin1/2015-11-05_00:18:27/var/backups/mysql/databases/newprod/field_revision_body.sql": Transport endpoint is not connected (107)
rsync: stat "/media/s3ql/crin1/2015-11-05_00:18:27/var/backups/mysql/databases/newprod/.field_revision_body.sql.UGxX5J" failed: Transport endpoint is not connected (107)
rsync: rename "/media/s3ql/crin1/2015-11-05_00:18:27/var/backups/mysql/databases/newprod/.field_revision_body.sql.UGxX5J" -&amp;gt; "mysql/databases/newprod/field_revision_body.sql": Transport endpoint is not connected (107)
rsync error: error in file IO (code 11) at receiver.c(393) [receiver=3.1.1]
Problem with rsync, try running this script again: /usr/local/bin/s3ql_backup crin1
&lt;/pre&gt;&lt;p&gt;
The error happens long after the &lt;tt&gt;rsync&lt;/tt&gt; for the file has completed, the file in question is 240M, I &lt;a class="ext-link" href="https://groups.google.com/forum/?_escaped_fragment_=msg/s3ql/6aRcam0Fygo/zpzIxoFLEgAJ#!msg/s3ql/6aRcam0Fygo/zpzIxoFLEgAJ"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;raised this on the s3ql list&lt;/a&gt; and then found &lt;a class="ext-link" href="https://bitbucket.org/nikratio/s3ql/issues/61/10-maint-s3ql-crashes-when-backing-up"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;this bug report&lt;/a&gt; so have set the number of threads to 1 in the script, &lt;a class="wiki" href="https://trac.crin.org/trac/wiki/S3QLMnt"&gt;wiki:S3QLMnt&lt;/a&gt; and posted &lt;a class="ext-link" href="https://groups.google.com/forum/?_escaped_fragment_=msg/s3ql/6aRcam0Fygo/_6toA5xMEgAJ#!msg/s3ql/6aRcam0Fygo/_6toA5xMEgAJ"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;a follow up email to the list&lt;/a&gt;.
&lt;/p&gt;
      </description>
      <category>Ticket</category>
    </item><item>
      
        <dc:creator>chris</dc:creator>

      <pubDate>Fri, 06 Nov 2015 16:54:18 GMT</pubDate>
      <title>hours, totalhours changed</title>
      <link>https://trac.crin.org/trac/ticket/39#comment:13</link>
      <guid isPermaLink="false">https://trac.crin.org/trac/ticket/39#comment:13</guid>
      <description>
          &lt;ul&gt;
            &lt;li&gt;&lt;strong&gt;hours&lt;/strong&gt;
                changed from &lt;em&gt;0&lt;/em&gt; to &lt;em&gt;1&lt;/em&gt;
            &lt;/li&gt;
            &lt;li&gt;&lt;strong&gt;totalhours&lt;/strong&gt;
                changed from &lt;em&gt;15.52&lt;/em&gt; to &lt;em&gt;16.52&lt;/em&gt;
            &lt;/li&gt;
          &lt;/ul&gt;
        &lt;p&gt;
I have updated &lt;tt&gt;/usr/lib/s3ql/s3ql/backends/s3c.py&lt;/tt&gt; from &lt;a class="ext-link" href="https://bitbucket.org/nikratio/s3ql/src/20dbe193b556f47e60ca40aba20d05214296ae29/src/s3ql/backends/s3c.py"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;here&lt;/a&gt; as per &lt;a class="ext-link" href="https://groups.google.com/forum/?_escaped_fragment_=msg/s3ql/6aRcam0Fygo/gE_LyUmuEgAJ#!msg/s3ql/6aRcam0Fygo/gE_LyUmuEgAJ"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;this suggestion&lt;/a&gt;. Time being recorded covers &lt;a class="ext-link" href="https://groups.google.com/forum/?_escaped_fragment_=msg/s3ql/6aRcam0Fygo/YUF15G2dEgAJ#!msg/s3ql/6aRcam0Fygo/YUF15G2dEgAJ"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;this email&lt;/a&gt;.
&lt;/p&gt;
      </description>
      <category>Ticket</category>
    </item><item>
      
        <dc:creator>chris</dc:creator>

      <pubDate>Mon, 09 Nov 2015 11:02:32 GMT</pubDate>
      <title>hours, totalhours changed</title>
      <link>https://trac.crin.org/trac/ticket/39#comment:14</link>
      <guid isPermaLink="false">https://trac.crin.org/trac/ticket/39#comment:14</guid>
      <description>
          &lt;ul&gt;
            &lt;li&gt;&lt;strong&gt;hours&lt;/strong&gt;
                changed from &lt;em&gt;0&lt;/em&gt; to &lt;em&gt;0.5&lt;/em&gt;
            &lt;/li&gt;
            &lt;li&gt;&lt;strong&gt;totalhours&lt;/strong&gt;
                changed from &lt;em&gt;16.52&lt;/em&gt; to &lt;em&gt;17.02&lt;/em&gt;
            &lt;/li&gt;
          &lt;/ul&gt;
        &lt;p&gt;
I checked the backups each day over the weekend and it has now run three times without an issue, so I have &lt;a class="ext-link" href="https://groups.google.com/forum/?_escaped_fragment_=msg/s3ql/6aRcam0Fygo/NhBljDb4AAAJ#!msg/s3ql/6aRcam0Fygo/NhBljDb4AAAJ"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;reported that to the developer&lt;/a&gt; and hopefully if it runs OK for the rest of the week then this ticket is good to close.
&lt;/p&gt;
      </description>
      <category>Ticket</category>
    </item><item>
      
        <dc:creator>chris</dc:creator>

      <pubDate>Thu, 07 Jan 2016 12:11:40 GMT</pubDate>
      <title>hours, status, totalhours changed; resolution set</title>
      <link>https://trac.crin.org/trac/ticket/39#comment:15</link>
      <guid isPermaLink="false">https://trac.crin.org/trac/ticket/39#comment:15</guid>
      <description>
          &lt;ul&gt;
            &lt;li&gt;&lt;strong&gt;hours&lt;/strong&gt;
                changed from &lt;em&gt;0&lt;/em&gt; to &lt;em&gt;0.1&lt;/em&gt;
            &lt;/li&gt;
            &lt;li&gt;&lt;strong&gt;status&lt;/strong&gt;
                changed from &lt;em&gt;new&lt;/em&gt; to &lt;em&gt;closed&lt;/em&gt;
            &lt;/li&gt;
            &lt;li&gt;&lt;strong&gt;resolution&lt;/strong&gt;
                set to &lt;em&gt;fixed&lt;/em&gt;
            &lt;/li&gt;
            &lt;li&gt;&lt;strong&gt;totalhours&lt;/strong&gt;
                changed from &lt;em&gt;17.02&lt;/em&gt; to &lt;em&gt;17.12&lt;/em&gt;
            &lt;/li&gt;
          &lt;/ul&gt;
        &lt;p&gt;
This is still working without errors, closing.
&lt;/p&gt;
      </description>
      <category>Ticket</category>
    </item>
 </channel>
</rss>