<?xml version="1.0"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0">
  <channel>
    <title>CRIN Trac: Ticket #11: Set up backups</title>
    <link>https://trac.crin.org/trac/ticket/11</link>
    <description>&lt;p&gt;
The plan is to use &lt;a class="ext-link" href="http://www.advania.com/datacentres/solutions/advania-cloud-services/"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;Advania S3 storage space&lt;/a&gt; (as &lt;a class="ext-link" href="https://www.greenqloud.com/public-cloud-faq/"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;GreenQloud is shutting down&lt;/a&gt;) and &lt;a class="ext-link" href="https://greenqloud.zendesk.com/entries/44611757-How-To-Use-S3QL-to-mount-a-StorageQloud-bucket-on-Debian-7-Wheezy-"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;S3QL&lt;/a&gt; to backup the existing Servers at GreenQloud and also, on an on-going basis, &lt;a class="wiki" href="https://trac.crin.org/trac/wiki/Crin1"&gt;Crin1&lt;/a&gt; and &lt;a class="wiki" href="https://trac.crin.org/trac/wiki/Crin2"&gt;Crin2&lt;/a&gt;.
&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/11</link>
    </image>
    <generator>Trac 1.0.2</generator>
    <item>
      
        <dc:creator>chris</dc:creator>

      <pubDate>Fri, 15 May 2015 14:04:38 GMT</pubDate>
      <title>hours changed; totalhours set</title>
      <link>https://trac.crin.org/trac/ticket/11#comment:1</link>
      <guid isPermaLink="false">https://trac.crin.org/trac/ticket/11#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;1.5&lt;/em&gt;
            &lt;/li&gt;
            &lt;li&gt;&lt;strong&gt;totalhours&lt;/strong&gt;
                set to &lt;em&gt;1.5&lt;/em&gt;
            &lt;/li&gt;
          &lt;/ul&gt;
        &lt;p&gt;
The &lt;a class="ext-link" href="https://qstack.advania.com/login"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;Advania Qstack&lt;/a&gt; interface requires 3rd party cookies to be enabled before you can login, it tooks a while to discover this. Their documentation for setting up encrypted S3QL storage is here:
&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;&lt;a class="ext-link" href="https://qstack.advania.com/support/search/44611757"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;https://qstack.advania.com/support/search/44611757&lt;/a&gt;
&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;
Go to the Storage page:
&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;&lt;a class="ext-link" href="https://qstack.advania.com/storage"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;https://qstack.advania.com/storage&lt;/a&gt;
&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;
Follow "Create new bucket", create &lt;tt&gt;crin-gq-db1&lt;/tt&gt; as a backup bucket for the current live database server, then on &lt;tt&gt;db1&lt;/tt&gt; the &lt;tt&gt;/root/.s3ql/authinfo2&lt;/tt&gt; file needs updating:
&lt;/p&gt;
&lt;pre class="wiki"&gt;[s3c]
storage-url: s3c://s.qstack.advania.com:443/crin-gq-db1
backend-login: [API key]
backend-password: [Secret key]
&lt;/pre&gt;&lt;p&gt;
Delete the old files and create a filesystem:
&lt;/p&gt;
&lt;pre class="wiki"&gt;rm -rf /var/s3ql/*
mkfs.s3ql --cachedir /var/s3ql --authfile /root/.s3ql/authinfo2 --ssl \
  s3c://s.qstack.advania.com:443/crin-gq-db1
&lt;/pre&gt;&lt;p&gt;
And this generates an error:
&lt;/p&gt;
&lt;pre class="wiki"&gt;Uncaught top-level exception. Traceback (most recent call last):
  File '/usr/bin/mkfs.s3ql', line 9, in &amp;lt;module&amp;gt;()
    load_entry_point('s3ql==1.11.1', 'console_scripts', 'mkfs.s3ql')()
  Current bindings:
    load_entry_point = &amp;lt;function load_entry_point&amp;gt;
  File '/usr/lib/s3ql/s3ql/mkfs.py', line 95, in main(args=['--cachedir', '/var/s3ql', '--authfile', '/root/.s3ql/authinfo2', '--ssl', 's3c://s.qstack.advania.com:443/crin-gq-db1'])
    plain_backend = get_backend(options, plain=True)
  Current bindings:
plain_backend undefined
    get_backend = &amp;lt;function get_backend&amp;gt; (global)
    options = Namespace(authfile='/root/.s3ql/authinfo2', cach...url='s3c://s.qstack.advania.com:443/crin-gq-db1')
plain undefined
    builtinTrue = True (local)
  File '/usr/lib/s3ql/s3ql/backends/common.py', line 1103, in get_backend(options=Namespace(authfile='/root/.s3ql/authinfo2', cach...url='s3c://s.qstack.advania.com:443/crin-gq-db1'), plain=True)
    return get_backend_factory(options, plain)()
  Current bindings:
    get_backend_factory = &amp;lt;function get_backend_factory&amp;gt; (global)
    options = Namespace(authfile='/root/.s3ql/authinfo2', cach...url='s3c://s.qstack.advania.com:443/crin-gq-db1')
    plain = True
  File '/usr/lib/s3ql/s3ql/backends/common.py', line 1174, in get_backend_factory(options=Namespace(authfile='/root/.s3ql/authinfo2', cach...url='s3c://s.qstack.advania.com:443/crin-gq-db1'), plain=True)
    _ = backend['s3ql_passphrase']
  Current bindings:
_ undefined
    backend = &amp;lt;s3ql.backends.s3c.Backend object&amp;gt;
  File '/usr/lib/s3ql/s3ql/backends/common.py', line 197, in __getitem__(self=&amp;lt;s3ql.backends.s3c.Backend object&amp;gt;, key='s3ql_passphrase')
    return self.fetch(key)[0]
  Current bindings:
    self = &amp;lt;s3ql.backends.s3c.Backend object&amp;gt;
    self.fetch = &amp;lt;bound method Backend.fetch of &amp;lt;s3ql.backends.s3c.Backend object&amp;gt;&amp;gt; (local)
    key = 's3ql_passphrase'
  File '/usr/lib/s3ql/s3ql/backends/common.py', line 250, in fetch(self=&amp;lt;s3ql.backends.s3c.Backend object&amp;gt;, key='s3ql_passphrase')
    return self.perform_read(do_read, key)
  Current bindings:
    self = &amp;lt;s3ql.backends.s3c.Backend object&amp;gt;
    self.perform_read = &amp;lt;bound method Backend.perform_read of &amp;lt;s3ql.backends.s3c.Backend object&amp;gt;&amp;gt; (local)
    do_read = &amp;lt;function do_read&amp;gt;
    key = 's3ql_passphrase'
  File '/usr/lib/s3ql/s3ql/backends/common.py', line 61, in wrapped(self=&amp;lt;s3ql.backends.s3c.Backend object&amp;gt;, *a=(&amp;lt;function do_read&amp;gt;, 's3ql_passphrase'), **kw={})
    return fn(self, *a, **kw)
  Current bindings:
    fn = &amp;lt;function perform_read&amp;gt;
    self = &amp;lt;s3ql.backends.s3c.Backend object&amp;gt;
    a = (&amp;lt;function do_read&amp;gt;, 's3ql_passphrase')
    kw = {}
Uncaught top-level exception. Traceback (most recent call last):
  File '/usr/bin/mkfs.s3ql', line 9, in &amp;lt;module&amp;gt;()
    load_entry_point('s3ql==1.11.1', 'console_scripts', 'mkfs.s3ql')()
  Current bindings:
    load_entry_point = &amp;lt;function load_entry_point&amp;gt;
  File '/usr/lib/s3ql/s3ql/mkfs.py', line 95, in main(args=['--cachedir', '/var/s3ql', '--authfile', '/root/.s3ql/authinfo2', '--ssl', 's3c://s.qstack.advania.com:443/crin-gq-db1'])
    plain_backend = get_backend(options, plain=True)
  Current bindings:
plain_backend undefined
    get_backend = &amp;lt;function get_backend&amp;gt; (global)
    options = Namespace(authfile='/root/.s3ql/authinfo2', cach...url='s3c://s.qstack.advania.com:443/crin-gq-db1')
plain undefined
    builtinTrue = True (local)
  File '/usr/lib/s3ql/s3ql/backends/common.py', line 1103, in get_backend(options=Namespace(authfile='/root/.s3ql/authinfo2', cach...url='s3c://s.qstack.advania.com:443/crin-gq-db1'), plain=True)
    return get_backend_factory(options, plain)()
  Current bindings:
    get_backend_factory = &amp;lt;function get_backend_factory&amp;gt; (global)
    options = Namespace(authfile='/root/.s3ql/authinfo2', cach...url='s3c://s.qstack.advania.com:443/crin-gq-db1')
    plain = True
  File '/usr/lib/s3ql/s3ql/backends/common.py', line 1174, in get_backend_factory(options=Namespace(authfile='/root/.s3ql/authinfo2', cach...url='s3c://s.qstack.advania.com:443/crin-gq-db1'), plain=True)
    _ = backend['s3ql_passphrase']
  Current bindings:
_ undefined
    backend = &amp;lt;s3ql.backends.s3c.Backend object&amp;gt;
  File '/usr/lib/s3ql/s3ql/backends/common.py', line 197, in __getitem__(self=&amp;lt;s3ql.backends.s3c.Backend object&amp;gt;, key='s3ql_passphrase')
    return self.fetch(key)[0]
  Current bindings:
    self = &amp;lt;s3ql.backends.s3c.Backend object&amp;gt;
    self.fetch = &amp;lt;bound method Backend.fetch of &amp;lt;s3ql.backends.s3c.Backend object&amp;gt;&amp;gt; (local)
    key = 's3ql_passphrase'
  File '/usr/lib/s3ql/s3ql/backends/common.py', line 250, in fetch(self=&amp;lt;s3ql.backends.s3c.Backend object&amp;gt;, key='s3ql_passphrase')
    return self.perform_read(do_read, key)
  Current bindings:
    self = &amp;lt;s3ql.backends.s3c.Backend object&amp;gt;
    self.perform_read = &amp;lt;bound method Backend.perform_read of &amp;lt;s3ql.backends.s3c.Backend object&amp;gt;&amp;gt; (local)
    do_read = &amp;lt;function do_read&amp;gt;
    key = 's3ql_passphrase'
  File '/usr/lib/s3ql/s3ql/backends/common.py', line 61, in wrapped(self=&amp;lt;s3ql.backends.s3c.Backend object&amp;gt;, *a=(&amp;lt;function do_read&amp;gt;, 's3ql_passphrase'), **kw={})
    return fn(self, *a, **kw)
  Current bindings:
    fn = &amp;lt;function perform_read&amp;gt;
    self = &amp;lt;s3ql.backends.s3c.Backend object&amp;gt;
    a = (&amp;lt;function do_read&amp;gt;, 's3ql_passphrase')
    kw = {}
  File '/usr/lib/s3ql/s3ql/backends/common.py', line 223, in perform_read(self=&amp;lt;s3ql.backends.s3c.Backend object&amp;gt;, fn=&amp;lt;function do_read&amp;gt;, key='s3ql_passphrase')
    with self.open_read(key) as fh:
  Current bindings:
    self = &amp;lt;s3ql.backends.s3c.Backend object&amp;gt;
    self.open_read = &amp;lt;bound method Backend.open_read of &amp;lt;s3ql.backends.s3c.Backend object&amp;gt;&amp;gt; (local)
    key = 's3ql_passphrase'
fh undefined
  File '/usr/lib/s3ql/s3ql/backends/common.py', line 61, in wrapped(self=&amp;lt;s3ql.backends.s3c.Backend object&amp;gt;, *a=('s3ql_passphrase',), **kw={})
    return fn(self, *a, **kw)
  Current bindings:
    fn = &amp;lt;function open_read&amp;gt;
    self = &amp;lt;s3ql.backends.s3c.Backend object&amp;gt;
    a = ('s3ql_passphrase',)
    kw = {}
  File '/usr/lib/s3ql/s3ql/backends/s3c.py', line 281, in open_read(self=&amp;lt;s3ql.backends.s3c.Backend object&amp;gt;, key='s3ql_passphrase')
    resp = self._do_request('GET', '/%s%s' % (self.prefix, key))
  Current bindings:
resp undefined
    self = &amp;lt;s3ql.backends.s3c.Backend object&amp;gt;
    self._do_request = &amp;lt;bound method Backend._do_request of &amp;lt;s3ql.backends.s3c.Backend object&amp;gt;&amp;gt; (local)
    self.prefix = '' (local)
    key = 's3ql_passphrase'
  File '/usr/lib/s3ql/s3ql/backends/s3c.py', line 402, in _do_request(self=&amp;lt;s3ql.backends.s3c.Backend object&amp;gt;, method='GET', path='/s3ql_passphrase', subres=None, query_string=None, headers={'authorization': 'AWS XXX:XXX', 'connection': 'keep-alive', 'content-length': '0', 'date': 'Fri, 15 May 2015 13:19:22 GMT'}, body=None)
    raise HTTPError(resp.status, resp.reason, resp.getheaders(), resp.read())
  Current bindings:
    HTTPError = &amp;lt;class 's3ql.backends.s3c.HTTPError'&amp;gt; (global)
    resp = &amp;lt;httplib.HTTPResponse instance&amp;gt;
    resp.status = 404 (local)
    resp.reason = 'Not Found' (local)
    resp.getheaders = &amp;lt;bound method HTTPResponse.getheaders of &amp;lt;httplib.HTTPResponse instance&amp;gt;&amp;gt; (local)
    resp.read = &amp;lt;bound method HTTPResponse.read of &amp;lt;httplib.HTTPResponse instance&amp;gt;&amp;gt; (local)
Exception: HTTPError: 404 Not Found
  _set_retry_after = &amp;lt;bound method HTTPError._set_retry_after of HTTPError()&amp;gt;
  args = ()
  body = "&amp;lt;?xml version='1.0' encoding='UTF-8'?&amp;gt;\n&amp;lt;Error&amp;gt;&amp;lt;C...25a&amp;lt;/RequestId&amp;gt;&amp;lt;Key&amp;gt;s3ql_passphrase&amp;lt;/Key&amp;gt;&amp;lt;/Error&amp;gt;"
  headers = [('x-amz-id-2', 'XXX'), ('transfer-encoding', 'chunked'), ('connection', 'keep-alive'), ('x-amz-request-id', 'XXX'), ('x-trans-id', 'XXX'), ('date', 'Fri, 15 May 2015 13:19:23 GMT'), ('content-type', 'text/xml')]
  message = ''
  msg = 'Not Found'
  retry_after = None
  status = 404
&lt;/pre&gt;&lt;p&gt;
Which I don't really understand, the URL is correct: &lt;a class="ext-link" href="https://s.qstack.advania.com/crin-gq-db1"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;https://s.qstack.advania.com/crin-gq-db1&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
Perhaps it is todo with the fact that &lt;tt&gt;db1&lt;/tt&gt; was set up to backup to GreenQloud's S3 storage, perhaps the Debian 7 (Wheezy) version of &lt;tt&gt;s3ql&lt;/tt&gt; is too old, so trying to set it up on &lt;a class="wiki" href="https://trac.crin.org/trac/wiki/Crin1"&gt;Crin1&lt;/a&gt;:
&lt;/p&gt;
&lt;pre class="wiki"&gt;sudo -i
aptitude install s3ql
mkdir /root/.s3ql
chmod 700 /root/.s3ql
touch /root/.s3ql/authinfo2
chmod 600 /root/.s3ql/authinfo2
&lt;/pre&gt;&lt;p&gt;
Add the following to &lt;tt&gt;/root/.s3ql/authinfo2&lt;/tt&gt;:
&lt;/p&gt;
&lt;pre class="wiki"&gt;[s3c]
storage-url: s3c://s.qstack.advania.com:443/crin-1984-crin1
backend-login: [API key]
backend-password: [Secret key]
&lt;/pre&gt;&lt;p&gt;
Create the &lt;tt&gt;crin-1984-crin1&lt;/tt&gt; bucket at Advania and try to format the filesystem:
&lt;/p&gt;
&lt;pre class="wiki"&gt;mkdir /var/s3ql
chmod 700 /var/s3ql
mkfs.s3ql --cachedir /var/s3ql --authfile /root/.s3ql/authinfo2 --ssl \
  s3c://s.qstack.advania.com:443/crin-1984-crin1
  mkfs.s3ql: error: unrecognized arguments: --ssl
&lt;/pre&gt;&lt;p&gt;
So try without &lt;tt&gt;--ssl&lt;/tt&gt;:
&lt;/p&gt;
&lt;pre class="wiki"&gt;Before using S3QL, make sure to read the user's guide, especially
the 'Important Rules to Avoid Loosing Data' section.
Enter encryption password:
Confirm encryption password:
Generating random encryption key...
Encountered ConnectionTimedOut exception (send/recv timeout exceeded), retrying call to ObjectW.close for the 3-th time...
Creating metadata tables...
Dumping metadata...
..objects..
..blocks..
..inodes..
..inode_blocks..
..symlink_targets..
..names..
..contents..
..ext_attributes..
Compressing and uploading metadata...
Wrote 153 bytes of compressed metadata.
&lt;/pre&gt;&lt;p&gt;
That appears to work! The encryption passphrase was writen to &lt;tt&gt;/root/.s3ql/authinfo2&lt;/tt&gt; in this format:
&lt;/p&gt;
&lt;pre class="wiki"&gt;fs-passphrase: [encryption password]
&lt;/pre&gt;&lt;p&gt;
Make a directory to mount the space and mount it:
&lt;/p&gt;
&lt;pre class="wiki"&gt;mkdir /media/crin-1984-crin1
chmod 700 /media/crin-1984-crin1
mount.s3ql --cachedir /var/s3ql --authfile /root/.s3ql/authinfo2 \
--allow-root s3c://s.qstack.advania.com:443/crin-1984-crin1 \
/media/crin-1984-crin1
  Using 10 upload threads.
  Autodetected 65474 file descriptors available for cache entries
  Enter file system encryption passphrase:
  Using cached metadata.
  Setting cache size to 88262 MB
  Mounting filesystem...
df -h
  Filesystem                                      Size  Used Avail Use% Mounted on
  /dev/dm-0                                       121G  6.7G  108G   6% /
  udev                                             10M     0   10M   0% /dev
  tmpfs                                           793M   17M  777M   3% /run
  tmpfs                                           2.0G     0  2.0G   0% /dev/shm
  tmpfs                                           5.0M     0  5.0M   0% /run/lock
  tmpfs                                           2.0G     0  2.0G   0% /sys/fs/cgroup
  /dev/sda1                                       236M   33M  191M  15% /boot
  s3c://s.qstack.advania.com:443/crin-1984-crin1  1.0T     0  1.0T   0% /media/crin-1984-crin1
&lt;/pre&gt;&lt;p&gt;
So it looks like the format for the authfile has perhaps changed with this version of S3QL (the documentation I'm following was written for Debian 7 and we are on Debian 8 now).
&lt;/p&gt;
&lt;p&gt;
But it works! I'll try some more to get it working on the GreenQloud servers but if it can't be then I could mount the GreenQloud servers onto the 1984.is servers via SFTP and then backup up to Advania from there, or perhaps I should compile a new version of S3QL or perhaps one from backports can be used, this will all have to wait till next week now.
&lt;/p&gt;
      </description>
      <category>Ticket</category>
    </item><item>
      
        <dc:creator>chris</dc:creator>

      <pubDate>Mon, 18 May 2015 11:57:29 GMT</pubDate>
      <title>hours, totalhours changed</title>
      <link>https://trac.crin.org/trac/ticket/11#comment:2</link>
      <guid isPermaLink="false">https://trac.crin.org/trac/ticket/11#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;1.25&lt;/em&gt;
            &lt;/li&gt;
            &lt;li&gt;&lt;strong&gt;totalhours&lt;/strong&gt;
                changed from &lt;em&gt;1.5&lt;/em&gt; to &lt;em&gt;2.75&lt;/em&gt;
            &lt;/li&gt;
          &lt;/ul&gt;
        &lt;p&gt;
Debian Wheezy (which web1.crin.org is running) has &lt;a class="ext-link" href="https://packages.debian.org/wheezy/s3ql"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;s3ql (1.11.1-3+deb7u1)&lt;/a&gt;, there isn't a newer version available from backports and looking at the &lt;a class="ext-link" href="https://bitbucket.org/nikratio/s3ql"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;s3ql site&lt;/a&gt; it doesn't seem like compiling a new version would be a quick answer.
&lt;/p&gt;
&lt;p&gt;
So mounting the live servers via SFTP and then using the new servers to upload the data to the S3 storage seems like the easiest thing to try.
&lt;/p&gt;
&lt;p&gt;
On &lt;a class="wiki" href="https://trac.crin.org/trac/wiki/Crin1"&gt;Crin1&lt;/a&gt; create some mount points and mount db1.crin.org via SFTP:
&lt;/p&gt;
&lt;pre class="wiki"&gt;cd /media
mkdir db1.crin.org
mkdir crin-gq-db1
aptitude install sshfs
sshfs db1:/ db1.crin.org/
&lt;/pre&gt;&lt;p&gt;
Create a script to mount this space at &lt;tt&gt;/usr/local/bin/mnt-sftp-db1&lt;/tt&gt;, containing:
&lt;/p&gt;
&lt;pre class="wiki"&gt;#!/bin/bash
# http://fuse.sourceforge.net/sshfs.html
sshfs db1:/ /media/db1.crin.org/
&lt;/pre&gt;&lt;p&gt;
And one to unmount it at &lt;tt&gt;/usr/local/bin/umnt-sftp-db1&lt;/tt&gt;, containing:
&lt;/p&gt;
&lt;pre class="wiki"&gt;#!/bin/bash
# http://fuse.sourceforge.net/sshfs.html
fusermount -u /media/db1.crin.org
&lt;/pre&gt;&lt;p&gt;
Create a S3 file system and mount it:
&lt;/p&gt;
&lt;pre class="wiki"&gt;mkfs.s3ql --cachedir /var/s3ql --authfile /root/.s3ql/authinfo2.db1 s3c://s.qstack.advania.com:443/crin-gq-db1
mount.s3ql --cachedir /var/s3ql --authfile /root/.s3ql/authinfo2.db1 --allow-root s3c://s.qstack.advania.com:443/crin-gq-db1 /media/crin-gq-db1
&lt;/pre&gt;&lt;p&gt;
Create a script to mount the S3QL storage space at &lt;tt&gt;/usr/local/bin/mnt-s3ql-db1&lt;/tt&gt; containing:
&lt;/p&gt;
&lt;pre class="wiki"&gt;#!/bin/bash
# this scipt is for mounting a s3 compatible bucket using s3ql
# this is the name of the storageqloud bucket and also
# the local mount point under $MOUNT
BUCKET="crin-gq-db1"
# mount directory
MOUNT="/media"
# s3ql cache directory
CACHE="/var/s3ql"
# s3ql auth file
AUTH="/root/.s3ql/authinfo2.db1"
# s3ql server
SERVER="s3c://s.qstack.advania.com:443"
# check that the script is being run by root
if [[ "$(id -u)" != "0" ]] ; then
  echo "You must run $0 as root or via sudo"
  exit 2
fi
# if force is wanted for filesystem check
if [[ $1 == "--force" ]]; then
  # file system check with force
  fsck.s3ql --cachedir ${CACHE} --authfile ${AUTH} --force --batch ${SERVER}/${BUCKET} \
  || echo "Force filesystem check of ${SERVER}/${BUCKET} failed"
else
  # file system check
  fsck.s3ql --cachedir ${CACHE} --authfile ${AUTH} --batch ${SERVER}/${BUCKET} \
  || echo "Filesystem check of ${SERVER}/${BUCKET} failed"
fi
# mount the s3ql file system
mount.s3ql --cachedir ${CACHE} --authfile ${AUTH} \
  --allow-root ${SERVER}/${BUCKET} ${MOUNT}/${BUCKET} || \
  echo "Mounting ${SERVER}/${BUCKET} on ${MOUNT}/${BUCKET} failed"
exit 0
&lt;/pre&gt;&lt;p&gt;
And one for unmounting at &lt;tt&gt;/usr/local/bin/umnt-sftp-db1&lt;/tt&gt;
&lt;/p&gt;
&lt;pre class="wiki"&gt;#!/bin/bash
# this scipt is for unmounting a s3 compatible bucket using s3ql
# this is the name of the storageqloud bucket and also
# the local mount point under /media
BUCKET="crin-gq-db1"
# mount directory
MOUNT="/media"
# s3ql cache directory
CACHE="/var/s3ql"
# s3ql auth file
AUTH="/root/.s3ql/authinfo2.db1"
# s3ql server
SERVER="s3c://s.qstack.advania.com:443"
# check that the script is being run by root
if [[ "$(id -u)" != "0" ]] ; then
  echo "You must run $0 as root or via sudo"
  exit 2
fi
# if force is needed
if [[ $1 == "--force" ]]; then
  fusermount -u -z ${MOUNT}/${BUCKET}
  killall -9 mount.s3ql
  # file system check with force
  fsck.s3ql --cachedir ${CACHE} --authfile ${AUTH} --batch --force ${SERVER}/${BUCKET}
else
  # unmount
  umount.s3ql ${MOUNT}/${BUCKET}
  # check the file system
  fsck.s3ql --cachedir ${CACHE} --authfile ${AUTH} --batch ${SERVER}/${BUCKET}
fi
exit 0
&lt;/pre&gt;&lt;p&gt;
Create a script to backup the server at &lt;tt&gt;/usr/local/bin/backup-s3ql-db1&lt;/tt&gt; containing:
&lt;/p&gt;
&lt;pre class="wiki"&gt;#!/bin/bash
# these two variables are different on different servers
BUCKET="crin-gq-db1"
BACKUP_DIRS="/media/db1.crin.org/var/backups/mysql/databases /media/db1.crin.org/root /media/db1.crin.org/etc /media/db1.crin.org/usr/local/sbin /media/db1.crin.org/home"
# mount directory
MOUNT="/media"
# base directory for backups
BACKUP_ROOT="${MOUNT}/${BUCKET}"
# the latest backup
BACKUP_LATEST="${BACKUP_ROOT}/latest"
DATE=$(date "+%Y-%m-%d_%H-%M")
YEAR=$(date "+%Y")
MONTH=$(date "+%m")
# archive of the latest backup
BACKUP_ARCHIVE="${BACKUP_ROOT}/${YEAR}/${MONTH}/$DATE"
# rsync command
#RSYNC="rsync -av --delete --timeout=120 --bwlimit=10000"
RSYNC="rsync -aq --delete --timeout=120 --bwlimit=10000"
# check that the script is being run by root
if [[ "$(id -u)" != "0" ]] ; then
  echo "You must run $0 as root or via sudo"
  exit 2
fi
# check that the s3ql file system is mounted
MOUNTED=$(df -h | grep ${BUCKET})
if [[ ! ${MOUNTED} ]]; then
  echo "${BACKUP_ROOT} is not mounted"
  # unmount s3ql filesystem with check to see of force is needed here
  FORCE_UNMOUNT=$(umnt-s3ql 2&amp;gt;&amp;amp;1 | grep "Can not check mounted file system.")
  # force is needed to unmount the s3ql file system
  if [[ ${FORCE_UNMOUNT} ]]; then
    echo "using force to unmount ${BACKUP_ROOT}"
    umnt-s3ql-db1 --force
  fi
  # mount the s3ql filesystem
  echo "Mounting ${BACKUP_ROOT}"
  mnt-s3ql-db1
fi
# copy data to $BACKUP_LATEST
for d in ${BACKUP_DIRS}; do
  # check the s3ql file system is still mounted
  MOUNTED=$(df -h | grep ${BUCKET})
  if [[ ${MOUNTED} ]]; then
    echo "Starting backup of ${d}"
    test -d ${BACKUP_LATEST}${d} || mkdir -p ${BACKUP_LATEST}${d} || exit 1
    ${RSYNC} ${d}/ ${BACKUP_LATEST}${d}/ || exit 1
    echo "Completed backup of ${d}"
  else
    echo "${BACKUP_ROOT} is not mounted"
    exit 1
  fi
done
# copy $BACKUP_LATEST to $BACKUP_ARCHIVE and make it immutable
# make the parent directory for todays backup
test -d ${BACKUP_ROOT}/${YEAR}/${MONTH} || mkdir -p ${BACKUP_ROOT}/${YEAR}/${MONTH} || exit 1
# copy the latest backup to a directory based on the date
echo "Copying $BACKUP_LATEST to $BACKUP_ARCHIVE"
s3qlcp $BACKUP_LATEST $BACKUP_ARCHIVE || exit 1
# make the date based backup immutable
echo "Making $BACKUP_ARCHIVE immutable"
s3qllock $BACKUP_ARCHIVE || exit 1
echo "$0 Completed successfully"
exit 0
&lt;/pre&gt;&lt;p&gt;
Install screen and try running it:
&lt;/p&gt;
&lt;pre class="wiki"&gt;aptitude install screen
screen
backup-s3ql-db1
&lt;/pre&gt;
      </description>
      <category>Ticket</category>
    </item><item>
      
        <dc:creator>chris</dc:creator>

      <pubDate>Mon, 18 May 2015 13:47:02 GMT</pubDate>
      <title>hours, totalhours changed</title>
      <link>https://trac.crin.org/trac/ticket/11#comment:3</link>
      <guid isPermaLink="false">https://trac.crin.org/trac/ticket/11#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.15&lt;/em&gt;
            &lt;/li&gt;
            &lt;li&gt;&lt;strong&gt;totalhours&lt;/strong&gt;
                changed from &lt;em&gt;2.75&lt;/em&gt; to &lt;em&gt;2.9&lt;/em&gt;
            &lt;/li&gt;
          &lt;/ul&gt;
        &lt;p&gt;
That backup job ended and reported:
&lt;/p&gt;
&lt;pre class="wiki"&gt;Starting backup of /media/db1.crin.org/var/backups/mysql/databases
Completed backup of /media/db1.crin.org/var/backups/mysql/databases
Starting backup of /media/db1.crin.org/root
Completed backup of /media/db1.crin.org/root
Starting backup of /media/db1.crin.org/etc
Completed backup of /media/db1.crin.org/etc
Starting backup of /media/db1.crin.org/usr/local/sbin
Completed backup of /media/db1.crin.org/usr/local/sbin
Starting backup of /media/db1.crin.org/home
Completed backup of /media/db1.crin.org/home
Copying /media/crin-gq-db1/latest to /media/crin-gq-db1/2015/05/2015-05-18_11-55
Making /media/crin-gq-db1/2015/05/2015-05-18_11-55 immutable
./backup-s3ql-db1 Completed successfully
&lt;/pre&gt;&lt;p&gt;
So the backing up of all the live servers at GreenQloud can be done using this method, I'll sort that out tonight or tomorrow for the others.
&lt;/p&gt;
&lt;p&gt;
Note the scripts above don't contain a check that the SFTP filesystem is mounted -- this should be added before running them via cron.
&lt;/p&gt;
&lt;p&gt;
I also added &lt;tt&gt;s3ql.mount&lt;/tt&gt; to the process memory tracking so we can keep an eye on this (it might be better to unmount the s3ql storage when it isn't being used), see &lt;a class="ext-link" href="https://munin.crin.org/munin/crin.org/crin1.crin.org/multips_memory.html"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;crin1.crin.org :: multips memory&lt;/a&gt;.
&lt;/p&gt;
      </description>
      <category>Ticket</category>
    </item><item>
      
        <dc:creator>chris</dc:creator>

      <pubDate>Mon, 18 May 2015 16:07:47 GMT</pubDate>
      <title>hours, totalhours changed</title>
      <link>https://trac.crin.org/trac/ticket/11#comment:4</link>
      <guid isPermaLink="false">https://trac.crin.org/trac/ticket/11#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.35&lt;/em&gt;
            &lt;/li&gt;
            &lt;li&gt;&lt;strong&gt;totalhours&lt;/strong&gt;
                changed from &lt;em&gt;2.9&lt;/em&gt; to &lt;em&gt;3.25&lt;/em&gt;
            &lt;/li&gt;
          &lt;/ul&gt;
        &lt;p&gt;
Mounting the GreenQloud live webserver, web1.crin.org using SFTP on &lt;a class="wiki" href="https://trac.crin.org/trac/wiki/Crin2"&gt;Crin2&lt;/a&gt;:
&lt;/p&gt;
&lt;pre class="wiki"&gt;sudo -i
aptitude install s3ql sshfs
mkdir /root/.s3ql
chmod 700 /root/.s3ql
touch /root/.s3ql/authinfo2.web1
chmod 600 /root/.s3ql/authinfo2.web1
&lt;/pre&gt;&lt;p&gt;
Add the following to &lt;tt&gt;/root/.s3ql/authinfo2.web1&lt;/tt&gt;:
&lt;/p&gt;
&lt;pre class="wiki"&gt;[s3c]
storage-url: s3c://s.qstack.advania.com:443/crin-gq-web1
backend-login: [API key]
backend-password: [Secret key]
&lt;/pre&gt;&lt;p&gt;
Format and mount it:
&lt;/p&gt;
&lt;pre class="wiki"&gt;mkdir /var/s3ql
chmod 700 /var/s3ql
mkfs.s3ql --cachedir /var/s3ql --authfile /root/.s3ql/authinfo2.web1 s3c://s.qstack.advania.com:443/crin-gq-web1
mkdir /media/crin-gq-web1
chmod 700 /media/crin-gq-web1
mount.s3ql --cachedir /var/s3ql --authfile /root/.s3ql/authinfo2.web1 --allow-root s3c://s.qstack.advania.com:443/crin-gq-web1 /media/crin-gq-web1
&lt;/pre&gt;&lt;p&gt;
Mount the server filesystem over SFTP:
&lt;/p&gt;
&lt;pre class="wiki"&gt;mkdir /media/web1.crin.org
sshfs web1:/ /media/web1.crin.org/
&lt;/pre&gt;&lt;p&gt;
Create scripts as before, install screen and try running the backup:
&lt;/p&gt;
&lt;pre class="wiki"&gt;aptitude install screen
screen
backup-s3ql-web1
  Starting backup of /media/web1.crin.org/var/www
&lt;/pre&gt;&lt;p&gt;
Will check on this later...
&lt;/p&gt;
      </description>
      <category>Ticket</category>
    </item><item>
      
        <dc:creator>chris</dc:creator>

      <pubDate>Mon, 18 May 2015 17:46:45 GMT</pubDate>
      <title>hours, totalhours changed</title>
      <link>https://trac.crin.org/trac/ticket/11#comment:5</link>
      <guid isPermaLink="false">https://trac.crin.org/trac/ticket/11#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.9&lt;/em&gt;
            &lt;/li&gt;
            &lt;li&gt;&lt;strong&gt;totalhours&lt;/strong&gt;
                changed from &lt;em&gt;3.25&lt;/em&gt; to &lt;em&gt;4.15&lt;/em&gt;
            &lt;/li&gt;
          &lt;/ul&gt;
        &lt;p&gt;
Repeating the above to mount and backup the &lt;tt&gt;wiki.crin.org&lt;/tt&gt; and &lt;tt&gt;web2.crin.org&lt;/tt&gt; servers at GreenQloud via &lt;a class="wiki" href="https://trac.crin.org/trac/wiki/Crin1"&gt;Crin1&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;
&lt;tt&gt;web2.crin.org&lt;/tt&gt; and &lt;tt&gt;wiki.crin.org&lt;/tt&gt; didn't have MySQL database dumps to backup, so on both servers:
&lt;/p&gt;
&lt;pre class="wiki"&gt;aptitude install backupninja
ninjahelper
&lt;/pre&gt;&lt;p&gt;
Created a MySQL backup action, this will dump the MySQL databases every night into &lt;tt&gt;/var/backups/mysql/sqldump/&lt;/tt&gt; via the settings in &lt;tt&gt;/etc/backup.d/20.mysql&lt;/tt&gt;.
&lt;/p&gt;
&lt;p&gt;
The scripts were copied and then:
&lt;/p&gt;
&lt;pre class="wiki"&gt;mnt-sftp-web2
mkfs.s3ql --cachedir /var/s3ql --authfile /root/.s3ql/authinfo2.web2 s3c://s.qstack.advania.com:443/crin-gq-web2
mnt-s3ql-web2
screen
backup-s3ql-web2
  Starting backup of /media/web2.crin.org/root
&lt;/pre&gt;&lt;p&gt;
Repeat for the wiki server:
&lt;/p&gt;
&lt;pre class="wiki"&gt;mnt-sftp-wiki
mkfs.s3ql --cachedir /var/s3ql --authfile /root/.s3ql/authinfo2.wiki s3c://s.qstack.advania.com:443/crin-gq-wiki
mnt-s3ql-wiki
screen
backup-s3ql-wiki
&lt;/pre&gt;&lt;p&gt;
So, these all seem to be running OK, these are the filesystems we now have mounted on &lt;a class="wiki" href="https://trac.crin.org/trac/wiki/Crin2"&gt;Crin2&lt;/a&gt;:
&lt;/p&gt;
&lt;pre class="wiki"&gt;Filesystem                                   Size  Used Avail Use% Mounted on
/dev/dm-0                                    121G   27G   89G  23% /
udev                                          10M     0   10M   0% /dev
tmpfs                                        793M   25M  769M   4% /run
tmpfs                                        2.0G     0  2.0G   0% /dev/shm
tmpfs                                        5.0M     0  5.0M   0% /run/lock
tmpfs                                        2.0G     0  2.0G   0% /sys/fs/cgroup
/dev/sda1                                    236M   33M  191M  15% /boot
s3c://s.qstack.advania.com:443/crin-gq-web1  1.0T  390M  1.0T   1% /media/crin-gq-web1
web1:/                                       9.4G  1.5G  7.4G  17% /media/web1.crin.org
&lt;/pre&gt;&lt;p&gt;
And on &lt;a class="wiki" href="https://trac.crin.org/trac/wiki/Crin1"&gt;Crin1&lt;/a&gt;:
&lt;/p&gt;
&lt;pre class="wiki"&gt;Filesystem                                      Size  Used Avail Use% Mounted on
/dev/dm-0                                       121G  9.9G  105G   9% /
udev                                             10M     0   10M   0% /dev
tmpfs                                           793M   33M  761M   5% /run
tmpfs                                           2.0G     0  2.0G   0% /dev/shm
tmpfs                                           5.0M     0  5.0M   0% /run/lock
tmpfs                                           2.0G     0  2.0G   0% /sys/fs/cgroup
/dev/sda1                                       236M   33M  191M  15% /boot
s3c://s.qstack.advania.com:443/crin-1984-crin1  1.0T     0  1.0T   0% /media/crin-1984-crin1
db1:/                                           9.4G  2.3G  6.6G  26% /media/db1.crin.org
s3c://s.qstack.advania.com:443/crin-gq-db1      1.0T  3.1G 1021G   1% /media/crin-gq-db1
web2:/                                          153G  2.8G  143G   2% /media/web2.crin.org
s3c://s.qstack.advania.com:443/crin-gq-web2     1.0T   47M  1.0T   1% /media/crin-gq-web2
wiki:/                                           18G  1.9G   16G  11% /media/wiki.crin.org
s3c://s.qstack.advania.com:443/crin-gq-wiki     1.0T   90M  1.0T   1% /media/crin-gq-wiki
&lt;/pre&gt;&lt;p&gt;
Assuming the backup jobs run OK the following tasks are to still to be done on this ticket:
&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;Amend the GreenQloud backup scripts to check that the GreenQloud servers are mounted via SFTP before they run
&lt;/li&gt;&lt;li&gt;Cron the GreenQloud backup scripts
&lt;/li&gt;&lt;li&gt;Setup the &lt;a class="wiki" href="https://trac.crin.org/trac/wiki/Crin2"&gt;Crin2&lt;/a&gt; backup scripts
&lt;/li&gt;&lt;li&gt;Cron the &lt;a class="wiki" href="https://trac.crin.org/trac/wiki/Crin1"&gt;Crin1&lt;/a&gt; and &lt;a class="wiki" href="https://trac.crin.org/trac/wiki/Crin2"&gt;Crin2&lt;/a&gt; backups
&lt;/li&gt;&lt;li&gt;Document how everything has been setup
&lt;/li&gt;&lt;/ul&gt;
      </description>
      <category>Ticket</category>
    </item><item>
      
        <dc:creator>chris</dc:creator>

      <pubDate>Tue, 19 May 2015 08:52:03 GMT</pubDate>
      <title>hours, totalhours changed</title>
      <link>https://trac.crin.org/trac/ticket/11#comment:6</link>
      <guid isPermaLink="false">https://trac.crin.org/trac/ticket/11#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;0.15&lt;/em&gt;
            &lt;/li&gt;
            &lt;li&gt;&lt;strong&gt;totalhours&lt;/strong&gt;
                changed from &lt;em&gt;4.15&lt;/em&gt; to &lt;em&gt;4.3&lt;/em&gt;
            &lt;/li&gt;
          &lt;/ul&gt;
        &lt;p&gt;
The wiki backup appears to have failed, this is the result:
&lt;/p&gt;
&lt;pre class="wiki"&gt;Starting backup of /media/wiki.crin.org/var/backups
Completed backup of /media/wiki.crin.org/var/backups
Starting backup of /media/wiki.crin.org/root
Completed backup of /media/wiki.crin.org/root
Starting backup of /media/wiki.crin.org/etc
Completed backup of /media/wiki.crin.org/etc
Starting backup of /media/wiki.crin.org/usr/local/sbin
Completed backup of /media/wiki.crin.org/usr/local/sbin
Starting backup of /media/wiki.crin.org/home
Completed backup of /media/wiki.crin.org/home
Copying /media/crin-gq-wiki/latest to /media/crin-gq-wiki/2015/05/2015-05-18_17-38
Making /media/crin-gq-wiki/2015/05/2015-05-18_17-38 immutable
File system appears to have crashed.
&lt;/pre&gt;&lt;p&gt;
The web2 backup is still running:
&lt;/p&gt;
&lt;pre class="wiki"&gt;Completed backup of /media/web2.crin.org/root
Starting backup of /media/web2.crin.org/home
Completed backup of /media/web2.crin.org/home
Starting backup of /media/web2.crin.org/etc
Completed backup of /media/web2.crin.org/etc
Starting backup of /media/web2.crin.org/var/www
Completed backup of /media/web2.crin.org/var/www
Starting backup of /media/web2.crin.org/var/backups
Completed backup of /media/web2.crin.org/var/backups
Copying /media/crin-gq-web2/latest to /media/crin-gq-web2/2015/05/2015-05-18_17-26
&lt;/pre&gt;&lt;p&gt;
From &lt;a class="ext-link" href="https://munin.crin.org/munin/crin.org/crin1.crin.org/fw_conntrack.html"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;the firewall traffic&lt;/a&gt; it looks like things are still happening
&lt;/p&gt;
&lt;p&gt;
The web1 backup on &lt;a class="wiki" href="https://trac.crin.org/trac/wiki/Crin2"&gt;Crin2&lt;/a&gt; is also still running:
&lt;/p&gt;
&lt;pre class="wiki"&gt;Starting backup of /media/web1.crin.org/var/www
&lt;/pre&gt;&lt;p&gt;
But it looks like it is still running based on &lt;a class="ext-link" href="https://munin.crin.org/munin/crin.org/crin2.crin.org/fw_conntrack.html"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;the firewall stats&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;
I'll check back on progress later today or tomorrow, the initial backup is bound to be slower that subsequent ones.
&lt;/p&gt;
      </description>
      <category>Ticket</category>
    </item><item>
      
        <dc:creator>chris</dc:creator>

      <pubDate>Tue, 19 May 2015 11:31:29 GMT</pubDate>
      <title>hours, totalhours changed</title>
      <link>https://trac.crin.org/trac/ticket/11#comment:7</link>
      <guid isPermaLink="false">https://trac.crin.org/trac/ticket/11#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;1&lt;/em&gt;
            &lt;/li&gt;
            &lt;li&gt;&lt;strong&gt;totalhours&lt;/strong&gt;
                changed from &lt;em&gt;4.3&lt;/em&gt; to &lt;em&gt;5.3&lt;/em&gt;
            &lt;/li&gt;
          &lt;/ul&gt;
        &lt;p&gt;
Just had this in the logwatch email from &lt;a class="wiki" href="https://trac.crin.org/trac/wiki/Crin1"&gt;Crin1&lt;/a&gt;:
&lt;/p&gt;
&lt;pre class="wiki"&gt; --------------------- Disk Space Begin ------------------------
 df: '/media/crin-gq-web2': Transport endpoint is not connected
 df: '/media/crin-gq-wiki': Transport endpoint is not connected
 Filesystem                                      Size  Used Avail Use% Mounted on
 /dev/dm-0                                       121G  9.7G  105G   9% /
 udev                                             10M     0   10M   0% /dev
 /dev/sda1                                       236M   33M  191M  15% /boot
 s3c://s.qstack.advania.com:443/crin-1984-crin1  1.0T     0  1.0T   0% /media/crin-1984-crin1
 db1:/                                           9.4G  2.3G  6.6G  26% /media/db1.crin.org
 s3c://s.qstack.advania.com:443/crin-gq-db1      1.0T  3.1G 1021G   1% /media/crin-gq-db1
 web2:/                                          153G  2.8G  143G   2% /media/web2.crin.org
 wiki:/                                           18G  1.9G   16G  11% /media/wiki.crin.org
 df: '/media/crin-gq-web2': Transport endpoint is not connected
 df: '/media/crin-gq-wiki': Transport endpoint is not connected
 ---------------------- Disk Space End -------------------------
&lt;/pre&gt;&lt;p&gt;
On &lt;a class="wiki" href="https://trac.crin.org/trac/wiki/Crin1"&gt;Crin1&lt;/a&gt;, the two jobs running in screen have ended, both with:
&lt;/p&gt;
&lt;pre class="wiki"&gt;File system appears to have crashed.
&lt;/pre&gt;&lt;p&gt;
So:
&lt;/p&gt;
&lt;pre class="wiki"&gt;umnt-s3ql-web2
  File system appears to have crashed.
  Can not check mounted file system.
umnt-s3ql-web2 --force
  Starting fsck of s3c://s.qstack.advania.com:443/crin-gq-web2
  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 9500 objects so far..Encountered ConnectionTimedOut exception (send/recv timeout exceeded), retrying call to RetryIterator.__next__ for the 3-th time...
  Encountered ConnectionTimedOut exception (send/recv timeout exceeded), retrying call to RetryIterator.__next__ for the 4-th time...
  Encountered ConnectionTimedOut exception (send/recv timeout exceeded), retrying call to RetryIterator.__next__ for the 5-th time...
  ..processed 18000 objects so far..Encountered ConnectionTimedOut exception (send/recv timeout exceeded), retrying call to Backend.delete for the 3-th time...
  Deleted spurious object 5589
  Deleted spurious object 7869
  Checking objects (sizes)...
  Object 9558 has no size information, retrieving from backend...
  Object 10557 has no size information, retrieving from backend...
  Encountered ConnectionTimedOut exception (send/recv timeout exceeded), retrying call to Backend.get_size for the 3-th time...
  Object 15692 has no size information, retrieving from backend...
  Object 15694 has no size information, retrieving from backend...
  Object 16457 has no size information, retrieving from backend...
  Object 16594 has no size information, retrieving from backend...
  Checking blocks (referenced objects)...
  Checking blocks (refcounts)...
  Checking inode-block mapping (blocks)...
  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..
  Uncaught top-level exception:
  Traceback (most recent call last):
    File "/usr/bin/fsck.s3ql", line 9, in &amp;lt;module&amp;gt;
      load_entry_point('s3ql==2.11.1', 'console_scripts', 'fsck.s3ql')()
    File "/usr/lib/s3ql/s3ql/fsck.py", line 1213, in main
      dump_metadata(db, fh)
    File "/usr/lib/s3ql/s3ql/metadata.py", line 149, in dump_metadata
      dump_table(table, order, columns, db=db, fh=fh)
    File "s3ql/deltadump.pyx", line 317, in s3ql.deltadump.dump_table (src/s3ql/deltadump.c:4314)
    File "s3ql/deltadump.pyx", line 364, in s3ql.deltadump.dump_table (src/s3ql/deltadump.c:3963)
  ValueError: Can't dump NULL values
umnt-s3ql-web2
  /media/crin-gq-web2 is not on an S3QL file system
  Starting fsck of s3c://s.qstack.advania.com:443/crin-gq-web2
  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 16500 objects so far..Encountered ConnectionTimedOut exception (send/recv timeout exceeded), retrying call to RetryIterator.__next__ for the 3-th time...
  Encountered ConnectionTimedOut exception (send/recv timeout exceeded), retrying call to RetryIterator.__next__ for the 4-th time...
  Encountered ConnectionTimedOut exception (send/recv timeout exceeded), retrying call to RetryIterator.__next__ for the 5-th time...
  Encountered ConnectionTimedOut exception (send/recv timeout exceeded), retrying call to RetryIterator.__next__ for the 6-th time...
  ..processed 17500 objects so far..Encountered ConnectionTimedOut exception (send/recv timeout exceeded), retrying call to RetryIterator.__next__ for the 3-th time...
  Encountered ConnectionTimedOut exception (send/recv timeout exceeded), retrying call to RetryIterator.__next__ for the 4-th time...
  ..processed 18000 objects so far..
  Checking objects (sizes)...
  Checking blocks (referenced objects)...
  Checking blocks (refcounts)...
  Checking inode-block mapping (blocks)...
  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..
  Uncaught top-level exception:
  Traceback (most recent call last):
    File "/usr/bin/fsck.s3ql", line 9, in &amp;lt;module&amp;gt;
      load_entry_point('s3ql==2.11.1', 'console_scripts', 'fsck.s3ql')()
    File "/usr/lib/s3ql/s3ql/fsck.py", line 1213, in main
      dump_metadata(db, fh)
    File "/usr/lib/s3ql/s3ql/metadata.py", line 149, in dump_metadata
      dump_table(table, order, columns, db=db, fh=fh)
    File "s3ql/deltadump.pyx", line 317, in s3ql.deltadump.dump_table (src/s3ql/deltadump.c:4314)
    File "s3ql/deltadump.pyx", line 364, in s3ql.deltadump.dump_table (src/s3ql/deltadump.c:3963)
  ValueError: Can't dump NULL values
&lt;/pre&gt;&lt;p&gt;
After some searching I found &lt;a class="ext-link" href="https://bitbucket.org/nikratio/s3ql/issue/109/filesystem-seems-to-lock-up-s3ql-commands"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;someone else with an issue like this&lt;/a&gt;, but their problem seems to relate to the use of NFS, the issues might relate to the &lt;a class="ext-link" href="http://www.rath.org/s3ql-docs/durability.html"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;S3 storage consistency window&lt;/a&gt;, perhaps this needs to be raised with ​Advania, also I wonder if setting the &lt;a class="ext-link" href="http://www.rath.org/s3ql-docs/backends.html#cmdoption-s3c_backend-arg-tcp-timeout"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;tcp-timeout&lt;/a&gt; migth help since the error is &lt;em&gt;send/recv timeout exceeded&lt;/em&gt;, perhaps this needs raising as a &lt;a class="ext-link" href="https://bitbucket.org/nikratio/s3ql/issues?status=new&amp;amp;status=open"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;s3ql issue&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;
Perhas the scripts being used, which were written for a previous version of &lt;tt&gt;s3ql&lt;/tt&gt;, need improving, I have started reading the documentation to check, also there is a &lt;a class="ext-link" href="https://bitbucket.org/nikratio/s3ql/src/809d457684c8b01b44c72af2c413f226fb43d8bf/contrib/s3ql_backup.sh?at=default"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;backup script which has some features the one above doesn't&lt;/a&gt;.
&lt;/p&gt;
      </description>
      <category>Ticket</category>
    </item><item>
      
        <dc:creator>chris</dc:creator>

      <pubDate>Tue, 19 May 2015 13:24:09 GMT</pubDate>
      <title>hours, totalhours changed</title>
      <link>https://trac.crin.org/trac/ticket/11#comment:8</link>
      <guid isPermaLink="false">https://trac.crin.org/trac/ticket/11#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;1.18&lt;/em&gt;
            &lt;/li&gt;
            &lt;li&gt;&lt;strong&gt;totalhours&lt;/strong&gt;
                changed from &lt;em&gt;5.3&lt;/em&gt; to &lt;em&gt;6.48&lt;/em&gt;
            &lt;/li&gt;
          &lt;/ul&gt;
        &lt;p&gt;
Looking at the &lt;a class="wiki" href="https://trac.crin.org/trac/wiki/Crin2"&gt;Crin2&lt;/a&gt; &lt;a class="ext-link" href="https://munin.crin.org/munin/crin.org/crin2.crin.org/fw_conntrack.html"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;firewall stats&lt;/a&gt; I think we have the situation where after &lt;a class="ext-link" href="http://www.rath.org/s3ql-docs/umount.html"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;unmounting&lt;/a&gt; &lt;em&gt;"the file system may continue to upload data in the background for a while longer"&lt;/em&gt;, and that might also explain why &lt;tt&gt;df -h&lt;/tt&gt; is taking ages to list the file systems mounted on the server.
&lt;/p&gt;
&lt;p&gt;
The backup scripts did have one error in them regarding which unmount script was called, so this has been fixed, this is the &lt;tt&gt;web2&lt;/tt&gt; script:
&lt;/p&gt;
&lt;pre class="wiki"&gt;#!/bin/bash
# Check that these 4 vairables are correct:
# The bucket name
BUCKET="crin-gq-web2"
# The directories we want to backup, space seperated
BACKUP_DIRS="/media/web2.crin.org/root /media/web2.crin.org/home /media/web2.crin.org/etc /media/web2.crin.org/var/www /media/web2.crin.org/var/backups"
# The s3ql mount script
MNT_CMD="mnt-s3ql-web2"
# The s3ql unmount script
UMNT_CMD="umnt-sftp-web2"
# mount directory
MOUNT="/media"
# base directory for backups
BACKUP_ROOT="${MOUNT}/${BUCKET}"
# the latest backup
BACKUP_LATEST="${BACKUP_ROOT}/latest"
DATE=$(date "+%Y-%m-%d_%H-%M")
YEAR=$(date "+%Y")
MONTH=$(date "+%m")
# archive of the latest backup
BACKUP_ARCHIVE="${BACKUP_ROOT}/${YEAR}/${MONTH}/$DATE"
# rsync command
#RSYNC="rsync -av --delete --timeout=120 --bwlimit=10000"
RSYNC="rsync -aq --delete --timeout=120 --bwlimit=10000"
# check that the script is being run by root
if [[ "$(id -u)" != "0" ]] ; then
  echo "You must run $0 as root or via sudo"
  exit 2
fi
# check that the s3ql file system is mounted
MOUNTED=$(df -h | grep ${BUCKET})
if [[ ! ${MOUNTED} ]]; then
  echo "${BACKUP_ROOT} is not mounted"
  # unmount s3ql filesystem with check to see of force is needed here
  FORCE_UNMOUNT=$($UMNT_CMD 2&amp;gt;&amp;amp;1 | grep "Can not check mounted file system.")
  # force is needed to unmount the s3ql file system
  if [[ ${FORCE_UNMOUNT} ]]; then
    echo "using force to unmount ${BACKUP_ROOT}"
    $UMNT_CMD --force
  fi
  # mount the s3ql filesystem
  echo "Mounting ${BACKUP_ROOT}"
  $MNT_CMD
fi
# copy data to $BACKUP_LATEST
for d in ${BACKUP_DIRS}; do
  # check the s3ql file system is still mounted
  MOUNTED=$(df -h | grep ${BUCKET})
  if [[ ${MOUNTED} ]]; then
    echo "Starting backup of ${d}"
    test -d ${BACKUP_LATEST}${d} || mkdir -p ${BACKUP_LATEST}${d} || exit 1
    ${RSYNC} ${d}/ ${BACKUP_LATEST}${d}/ || exit 1
    echo "Completed backup of ${d}"
  else
    echo "${BACKUP_ROOT} is not mounted"
    exit 1
  fi
done
# copy $BACKUP_LATEST to $BACKUP_ARCHIVE and make it immutable
# make the parent directory for todays backup
test -d ${BACKUP_ROOT}/${YEAR}/${MONTH} || mkdir -p ${BACKUP_ROOT}/${YEAR}/${MONTH} || exit 1
# copy the latest backup to a directory based on the date
echo "Copying $BACKUP_LATEST to $BACKUP_ARCHIVE"
s3qlcp $BACKUP_LATEST $BACKUP_ARCHIVE || exit 1
# make the date based backup immutable
echo "Making $BACKUP_ARCHIVE immutable"
s3qllock $BACKUP_ARCHIVE || exit 1
echo "$0 Completed successfully"
exit 0
&lt;/pre&gt;&lt;p&gt;
The &lt;a class="ext-link" href="https://bitbucket.org/nikratio/s3ql/src/809d457684c8b01b44c72af2c413f226fb43d8bf/contrib/s3ql_backup.sh?at=default"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;s3ql_backup.sh&lt;/a&gt; script does differ in some ways, the directory names are designed to work with the &lt;a class="ext-link" href="https://bitbucket.org/nikratio/s3ql/src/809d457684c8b01b44c72af2c413f226fb43d8bf/contrib/expire_backups.py?at=default"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;expire_backups.py&lt;/a&gt; script, so that is a good reason to consider switching to use this, also the &lt;tt&gt;rsync&lt;/tt&gt; command differs, we have:
&lt;/p&gt;
&lt;pre class="wiki"&gt;RSYNC="rsync -aq --delete --timeout=120 --bwlimit=10000"
&lt;/pre&gt;&lt;p&gt;
And &lt;a class="ext-link" href="https://bitbucket.org/nikratio/s3ql/src/809d457684c8b01b44c72af2c413f226fb43d8bf/contrib/s3ql_backup.sh?at=default"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;s3ql_backup.sh&lt;/a&gt; has:
&lt;/p&gt;
&lt;pre class="wiki"&gt;rsync -aHAXx --delete-during --delete-excluded --partial -v \
    --exclude /.cache/ \
    --exclude /.s3ql/ \
    --exclude /.thumbnails/ \
    --exclude /tmp/ \
    "/home/my_username/" "./$new_backup/"
&lt;/pre&gt;&lt;p&gt;
However the problems not appear to be related to the &lt;tt&gt;rsync&lt;/tt&gt; command.
&lt;/p&gt;
&lt;p&gt;
Trying the unmount and check the &lt;tt&gt;crin-gq-wiki&lt;/tt&gt; bucket:
&lt;/p&gt;
&lt;pre class="wiki"&gt;umnt-s3ql-wiki --force
fusermount: failed to unmount /media/crin-gq-wiki: Invalid argument
mount.s3ql: no process found
Starting fsck of s3c://s.qstack.advania.com:443/crin-gq-wiki
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 500 objects so far..Encountered ConnectionTimedOut exception (send/recv timeout exceeded), retrying call to RetryIterator.__next__ for the 3-th time...
..processed 3500 objects so far..
Checking objects (sizes)...
Object 2869 has no size information, retrieving from backend...
Checking blocks (referenced objects)...
Checking blocks (refcounts)...
Checking inode-block mapping (blocks)...
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..
Uncaught top-level exception:
Traceback (most recent call last):
  File "/usr/bin/fsck.s3ql", line 9, in &amp;lt;module&amp;gt;
    load_entry_point('s3ql==2.11.1', 'console_scripts', 'fsck.s3ql')()
  File "/usr/lib/s3ql/s3ql/fsck.py", line 1213, in main
    dump_metadata(db, fh)
  File "/usr/lib/s3ql/s3ql/metadata.py", line 149, in dump_metadata
    dump_table(table, order, columns, db=db, fh=fh)
  File "s3ql/deltadump.pyx", line 317, in s3ql.deltadump.dump_table (src/s3ql/deltadump.c:4314)
  File "s3ql/deltadump.pyx", line 364, in s3ql.deltadump.dump_table (src/s3ql/deltadump.c:3963)
ValueError: Can't dump NULL values
&lt;/pre&gt;&lt;p&gt;
The above looks, very much like &lt;a class="ext-link" href="https://bitbucket.org/nikratio/s3ql/issue/99/cant-dump-null-values-when-storing"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;this error&lt;/a&gt; which &lt;a class="ext-link" href="https://bitbucket.org/nikratio/s3ql/commits/dd846bab60fc"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;was fixed on 2014-11-09&lt;/a&gt; and looking at &lt;a class="ext-link" href="https://bitbucket.org/nikratio/s3ql/downloads"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;the releases&lt;/a&gt; that means it was fixed in &lt;tt&gt;s3ql-2.12&lt;/tt&gt; but we are running:
&lt;/p&gt;
&lt;pre class="wiki"&gt;fsck.s3ql --version
  S3QL 2.11.1
&lt;/pre&gt;&lt;p&gt;
Debian testing and unstable have &lt;a class="ext-link" href="https://packages.debian.org/search?keywords=s3ql"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;2.13+dfsg-1&lt;/a&gt;, so lets try that on &lt;a class="wiki" href="https://trac.crin.org/trac/wiki/Crin1"&gt;Crin1&lt;/a&gt;, create &lt;tt&gt;/etc/apt/preferences&lt;/tt&gt; containing;
&lt;/p&gt;
&lt;pre class="wiki"&gt;Package: *
Pin: release n=jessie
Pin-Priority: 900
Package: s3ql
Pin: release n=stretch
Pin-Priority: 910
&lt;/pre&gt;&lt;p&gt;
And add the following to &lt;tt&gt;/etc/apt/sources.list&lt;/tt&gt;:
&lt;/p&gt;
&lt;pre class="wiki"&gt;# stretch
deb http://speglar.simnet.is/debian/ stretch main
deb-src http://speglar.simnet.is/debian/ stretch main
&lt;/pre&gt;&lt;p&gt;
Update and see what is on offer:
&lt;/p&gt;
&lt;pre class="wiki"&gt;apt-get update
apt-cache policy s3ql
s3ql:
  Installed: 2.11.1+dfsg-2
  Candidate: 2.13+dfsg-1
  Package pin: 2.13+dfsg-1
  Version table:
     2.13+dfsg-1 910
        500 http://speglar.simnet.is/debian/ stretch/main amd64 Packages
 *** 2.11.1+dfsg-2 910
        900 http://speglar.simnet.is/debian/ jessie/main amd64 Packages
        100 /var/lib/dpkg/status
&lt;/pre&gt;&lt;p&gt;
Install the &lt;tt&gt;stretch&lt;/tt&gt; version and try the filesystem check again:
&lt;/p&gt;
&lt;pre class="wiki"&gt;apt-get install s3ql
umnumnt-s3ql-wiki --force
  fusermount: failed to unmount /media/crin-gq-wiki: Invalid argument
  mount.s3ql: no process found
  Traceback (most recent call last):
    File "/usr/lib/python3/dist-packages/pkg_resources.py", line 449, in _build_master
      ws.require(__requires__)
    File "/usr/lib/python3/dist-packages/pkg_resources.py", line 745, in require
      needed = self.resolve(parse_requirements(requirements))
    File "/usr/lib/python3/dist-packages/pkg_resources.py", line 644, in resolve
      raise VersionConflict(dist, req)
  pkg_resources.VersionConflict: (dugong 3.3 (/usr/lib/python3/dist-packages), Requirement.parse('dugong&amp;gt;=3.4'))
  During handling of the above exception, another exception occurred:
  Traceback (most recent call last):
    File "/usr/bin/fsck.s3ql", line 5, in &amp;lt;module&amp;gt;
      from pkg_resources import load_entry_point
    File "/usr/lib/python3/dist-packages/pkg_resources.py", line 2876, in &amp;lt;module&amp;gt;
      working_set = WorkingSet._build_master()
    File "/usr/lib/python3/dist-packages/pkg_resources.py", line 451, in _build_master
      return cls._build_from_requirements(__requires__)
    File "/usr/lib/python3/dist-packages/pkg_resources.py", line 464, in _build_from_requirements
      dists = ws.resolve(reqs, Environment())
    File "/usr/lib/python3/dist-packages/pkg_resources.py", line 639, in resolve
      raise DistributionNotFound(req)
  pkg_resources.DistributionNotFound: dugong&amp;gt;=3.4
&lt;/pre&gt;&lt;p&gt;
So that don't work, switching back to the &lt;tt&gt;jessie&lt;/tt&gt; version:
&lt;/p&gt;
&lt;pre class="wiki"&gt;rm /etc/apt/preferences
vi /etc/apt/sources.list
aptitude remove s3ql
aptitude update
aptitude install s3ql
&lt;/pre&gt;&lt;p&gt;
It looks like we might have to &lt;a class="ext-link" href="http://www.rath.org/s3ql-docs/installation.html#installation"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;install s3ql from source&lt;/a&gt; to get a fixed version.
&lt;/p&gt;
      </description>
      <category>Ticket</category>
    </item><item>
      
        <dc:creator>chris</dc:creator>

      <pubDate>Tue, 19 May 2015 16:32:22 GMT</pubDate>
      <title>attachment set</title>
      <link>https://trac.crin.org/trac/ticket/11</link>
      <guid isPermaLink="false">https://trac.crin.org/trac/ticket/11</guid>
      <description>
          &lt;ul&gt;
            &lt;li&gt;&lt;strong&gt;attachment&lt;/strong&gt;
                set to &lt;em&gt;crin1-2015-05-19-multips_memory-day.png&lt;/em&gt;
            &lt;/li&gt;
          &lt;/ul&gt;
      </description>
      <category>Ticket</category>
    </item><item>
      
        <dc:creator>chris</dc:creator>

      <pubDate>Tue, 19 May 2015 16:43:15 GMT</pubDate>
      <title>hours, totalhours changed</title>
      <link>https://trac.crin.org/trac/ticket/11#comment:9</link>
      <guid isPermaLink="false">https://trac.crin.org/trac/ticket/11#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;0.15&lt;/em&gt;
            &lt;/li&gt;
            &lt;li&gt;&lt;strong&gt;totalhours&lt;/strong&gt;
                changed from &lt;em&gt;6.48&lt;/em&gt; to &lt;em&gt;6.63&lt;/em&gt;
            &lt;/li&gt;
          &lt;/ul&gt;
        &lt;p&gt;
Regarding the issue with the &lt;tt&gt;s3ql&lt;/tt&gt; version found in &lt;a class="closed ticket" href="https://trac.crin.org/trac/ticket/11#comment:8" title="defect: Set up backups (closed: fixed)"&gt;ticket:11#comment:8&lt;/a&gt;, where we hit a bug that is only solved in the &lt;tt&gt;s3ql&lt;/tt&gt; version in Debian 9 (stretch) and not the version in Debian 8 (Jessie), which we are running.
&lt;/p&gt;
&lt;p&gt;
I really don't want to start compiling source code on the servers if it can be avoided (it makes things harder to maintain in the long run, it could result in &lt;tt&gt;python3&lt;/tt&gt; having to be compiled from source, it might end up taking up a lot of time and we are already over the estimate of 6 hours for this ticket), also the &lt;a class="ext-link" href="https://munin.crin.org/munin/crin.org/crin1.crin.org/multips_memory.html"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;memory usage&lt;/a&gt; of &lt;tt&gt;mount.s3ql&lt;/tt&gt; is significant:
&lt;/p&gt;
&lt;p&gt;
&lt;a style="padding:0; border:none" href="https://trac.crin.org/trac/attachment/ticket/11/crin1-2015-05-19-multips_memory-day.png"&gt;&lt;img src="https://trac.crin.org/trac/raw-attachment/ticket/11/crin1-2015-05-19-multips_memory-day.png" /&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
Jonas -- could we have a small (512MB RAM) virtual server running Debian stretch (unstable) just for doing the s3 backups? If we had machine just for this it could mount the file systems to be backed up via sshfs and also the s3 space via s3ql and it would mean that the database server and web servers wouldn't need to allocate between 150MB and 850MB of RAM for the backup processes.
&lt;/p&gt;
      </description>
      <category>Ticket</category>
    </item><item>
      
        <dc:creator>chris</dc:creator>

      <pubDate>Wed, 20 May 2015 09:43:58 GMT</pubDate>
      <title>hours, totalhours changed</title>
      <link>https://trac.crin.org/trac/ticket/11#comment:10</link>
      <guid isPermaLink="false">https://trac.crin.org/trac/ticket/11#comment:10</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.15&lt;/em&gt;
            &lt;/li&gt;
            &lt;li&gt;&lt;strong&gt;totalhours&lt;/strong&gt;
                changed from &lt;em&gt;6.63&lt;/em&gt; to &lt;em&gt;6.78&lt;/em&gt;
            &lt;/li&gt;
          &lt;/ul&gt;
        &lt;p&gt;
Checking where things are with the backups on &lt;a class="wiki" href="https://trac.crin.org/trac/wiki/Crin2"&gt;Crin2&lt;/a&gt;:
&lt;/p&gt;
&lt;pre class="wiki"&gt;df -h
  df: ‘/media/crin-gq-web1’: Transport endpoint is not connected
  Filesystem      Size  Used Avail Use% Mounted on
  /dev/dm-0       121G   22G   94G  19% /
  udev             10M     0   10M   0% /dev
  tmpfs           793M   33M  761M   5% /run
  tmpfs           2.0G     0  2.0G   0% /dev/shm
  tmpfs           5.0M     0  5.0M   0% /run/lock
  tmpfs           2.0G     0  2.0G   0% /sys/fs/cgroup
  /dev/sda1       236M   33M  191M  15% /boot
  web1:/          9.4G  1.5G  7.4G  17% /media/web1.crin.org
umnt-s3ql-web1
  File system appears to have crashed.
  Can not check mounted file system.
umnt-s3ql-web1 --force
  mount.s3ql: no process found
  Starting fsck of s3c://s.qstack.advania.com:443/crin-gq-web1
  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 32500 objects so far..Deleted spurious object 4774
  Deleted spurious object 8748
  Deleted spurious object 9265
  Deleted spurious object 15484
  Deleted spurious object 32211
  Checking objects (sizes)...
  Checking blocks (referenced objects)...
  Checking blocks (refcounts)...
  Checking inode-block mapping (blocks)...
  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 1 MiB of compressed metadata.
  Cycling metadata backups...
  Backing up old metadata...
  Unexpected server reply: expected XML, got:
  200 OK
  Content-Length: 0
  x-amz-meta-data-03: XXX
  x-amz-meta-data-02: XXX
  x-amz-meta-data-01: XXX
  x-amz-meta-data-00: XXX
  x-amz-id-2: XXX
  x-amz-meta-md5: XXX
  Last-Modified: Wed, 20 May 2015 09:37:23 GMT
  ETag: "XXX"
  x-amz-request-id: XXX
  x-amz-meta-format: pickle
  Content-Type: text/html; charset="UTF-8"
  X-Trans-Id: XXX
  Date: Wed, 20 May 2015 09:37:23 +0000
  Connection: keep-alive
  Uncaught top-level exception:
  Traceback (most recent call last):
    File "/usr/bin/fsck.s3ql", line 9, in &amp;lt;module&amp;gt;
      load_entry_point('s3ql==2.11.1', 'console_scripts', 'fsck.s3ql')()
    File "/usr/lib/s3ql/s3ql/fsck.py", line 1224, in main
      cycle_metadata(backend)
    File "/usr/lib/s3ql/s3ql/metadata.py", line 127, in cycle_metadata
      backend.copy("s3ql_metadata", "s3ql_metadata_bak_0")
    File "/usr/lib/s3ql/s3ql/backends/comprenc.py", line 290, in copy
      self._copy_or_rename(src, dest, rename=False, metadata=metadata)
    File "/usr/lib/s3ql/s3ql/backends/comprenc.py", line 323, in _copy_or_rename
      self.backend.copy(src, dest, metadata=meta_raw)
    File "/usr/lib/s3ql/s3ql/backends/common.py", line 46, in wrapped
      return method(*a, **kw)
    File "/usr/lib/s3ql/s3ql/backends/s3c.py", line 376, in copy
      root = self._parse_xml_response(resp, body)
    File "/usr/lib/s3ql/s3ql/backends/s3c.py", line 528, in _parse_xml_response
      raise RuntimeError('Unexpected server response')
  RuntimeError: Unexpected server response
&lt;/pre&gt;&lt;p&gt;
So trying again:
&lt;/p&gt;
&lt;pre class="wiki"&gt;umnt-s3ql-web1 --force
  fusermount: failed to unmount /media/crin-gq-web1: Invalid argument
  mount.s3ql: no process found
  Starting fsck of s3c://s.qstack.advania.com:443/crin-gq-web1
  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 32500 objects so far..
  Checking objects (sizes)...
  Checking blocks (referenced objects)...
  Checking blocks (refcounts)...
  Checking inode-block mapping (blocks)...
  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 1 MiB of compressed metadata.
  Cycling metadata backups...
  Backing up old metadata...
  Unexpected server reply: expected XML, got:
  200 OK
  Content-Length: 0
  x-amz-meta-data-03: XXX
  x-amz-meta-data-02: XXX
  x-amz-meta-data-01: XXX
  x-amz-meta-data-00: XXX
  x-amz-id-2: XXX
  x-amz-meta-md5: XXX
  Last-Modified: Wed, 20 May 2015 09:41:40 GMT
  ETag: "XXX"
  x-amz-request-id: XXX
  x-amz-meta-format: pickle
  Content-Type: text/html; charset="UTF-8"
  X-Trans-Id: XXX
  Date: Wed, 20 May 2015 09:41:40 +0000
  Connection: keep-alive
  Uncaught top-level exception:
  Traceback (most recent call last):
    File "/usr/bin/fsck.s3ql", line 9, in &amp;lt;module&amp;gt;
      load_entry_point('s3ql==2.11.1', 'console_scripts', 'fsck.s3ql')()
    File "/usr/lib/s3ql/s3ql/fsck.py", line 1224, in main
      cycle_metadata(backend)
    File "/usr/lib/s3ql/s3ql/metadata.py", line 121, in cycle_metadata
      cycle_fn("s3ql_metadata_bak_%d" % i, "s3ql_metadata_bak_%d" % (i + 1))
    File "/usr/lib/s3ql/s3ql/backends/comprenc.py", line 290, in copy
      self._copy_or_rename(src, dest, rename=False, metadata=metadata)
    File "/usr/lib/s3ql/s3ql/backends/comprenc.py", line 323, in _copy_or_rename
      self.backend.copy(src, dest, metadata=meta_raw)
    File "/usr/lib/s3ql/s3ql/backends/common.py", line 46, in wrapped
      return method(*a, **kw)
    File "/usr/lib/s3ql/s3ql/backends/s3c.py", line 376, in copy
      root = self._parse_xml_response(resp, body)
    File "/usr/lib/s3ql/s3ql/backends/s3c.py", line 528, in _parse_xml_response
      raise RuntimeError('Unexpected server response')
  RuntimeError: Unexpected server response
&lt;/pre&gt;
      </description>
      <category>Ticket</category>
    </item><item>
      
        <dc:creator>chris</dc:creator>

      <pubDate>Tue, 02 Jun 2015 11:29:09 GMT</pubDate>
      <title>hours, totalhours changed</title>
      <link>https://trac.crin.org/trac/ticket/11#comment:11</link>
      <guid isPermaLink="false">https://trac.crin.org/trac/ticket/11#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;0.5&lt;/em&gt;
            &lt;/li&gt;
            &lt;li&gt;&lt;strong&gt;totalhours&lt;/strong&gt;
                changed from &lt;em&gt;6.78&lt;/em&gt; to &lt;em&gt;7.28&lt;/em&gt;
            &lt;/li&gt;
          &lt;/ul&gt;
        &lt;p&gt;
Setting up the new &lt;a class="wiki" href="https://trac.crin.org/trac/wiki/Crin3"&gt;Crin3&lt;/a&gt; backup server.
&lt;/p&gt;
&lt;p&gt;
Add user account and ssh keys
&lt;/p&gt;
&lt;pre class="wiki"&gt;export NEWUSER="chris"
adduser $NEWUSER
adduser $NEWUSER sudo
mkdir /home/$NEWUSER/.ssh
touch /home/$NEWUSER/.ssh/authorized_keys
chmod 600 /home/$NEWUSER/.ssh/authorized_keys
chmod 700 /home/$NEWUSER/.ssh
chown -R $NEWUSER:$NEWUSER  /home/$NEWUSER/.ssh
vim /home/$NEWUSER/.ssh/authorized_keys
&lt;/pre&gt;&lt;p&gt;
Install some essential tools:
&lt;/p&gt;
&lt;pre class="wiki"&gt;apt-get install rsync vim screen sshfs fail2ban iptables-persistent logwatch metche
&lt;/pre&gt;&lt;p&gt;
Sort out the editor:
&lt;/p&gt;
&lt;pre class="wiki"&gt;update-alternatives --config editor
echo "syntax on" &amp;gt; ~/.vimrc
&lt;/pre&gt;&lt;p&gt;
Lock down &lt;tt&gt;ssh&lt;/tt&gt;, edit these lines in &lt;tt&gt;/etc/ssh/sshd_config&lt;/tt&gt;:
&lt;/p&gt;
&lt;pre class="wiki"&gt;#PermitRootLogin yes
PermitRootLogin no
AllowGroups sudo
PasswordAuthentication no
&lt;/pre&gt;&lt;p&gt;
Restart &lt;tt&gt;ssh&lt;/tt&gt;.
&lt;/p&gt;
&lt;p&gt;
Install a couple of script, for doing updates and recording them:
&lt;/p&gt;
&lt;pre class="wiki"&gt;cd /usr/local/bin
wget https://svn.webarch.net/scripts/usr/local/bin/a-up --no-check-certificate -O a-up; chmod 755 a-up
wget https://svn.webarch.net/scripts/usr/local/bin/logchange --no-check-certificate -O logchange; chmod 755 logchange
&lt;/pre&gt;&lt;p&gt;
Sort out the name of the server, add a DNS entry.
&lt;/p&gt;
&lt;pre class="wiki"&gt;vi /etc/hosts /etc/hostname /etc/mailname
&lt;/pre&gt;&lt;p&gt;
Sort out where root email goes:
&lt;/p&gt;
&lt;pre class="wiki"&gt;vim /etc/aliases
newaliases
&lt;/pre&gt;&lt;p&gt;
Switch the server to Debian Stretch from Debian Jessie, edit &lt;tt&gt;/etc/sources&lt;/tt&gt;:
&lt;/p&gt;
&lt;pre class="wiki"&gt;# deb http://speglar.simnet.is/debian/ stretch main
deb http://speglar.simnet.is/debian/ stretch main non-free contrib
deb-src http://speglar.simnet.is/debian/ stretch main non-free contrib
deb http://security.debian.org/ stretch/updates main contrib non-free
deb-src http://security.debian.org/ stretch/updates main contrib non-free
# stretch-updates, previously known as 'volatile'
deb http://speglar.simnet.is/debian/ stretch-updates main contrib non-free
deb-src http://speglar.simnet.is/debian/ stretch-updates main contrib non-free
&lt;/pre&gt;&lt;p&gt;
Then:
&lt;/p&gt;
&lt;pre class="wiki"&gt;screen
apt-get update
&lt;/pre&gt;&lt;p&gt;
This will take a while, I'll come back to this later...
&lt;/p&gt;
      </description>
      <category>Ticket</category>
    </item><item>
      
        <dc:creator>chris</dc:creator>

      <pubDate>Tue, 02 Jun 2015 13:14:17 GMT</pubDate>
      <title>hours, totalhours changed</title>
      <link>https://trac.crin.org/trac/ticket/11#comment:12</link>
      <guid isPermaLink="false">https://trac.crin.org/trac/ticket/11#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;1.5&lt;/em&gt;
            &lt;/li&gt;
            &lt;li&gt;&lt;strong&gt;totalhours&lt;/strong&gt;
                changed from &lt;em&gt;7.28&lt;/em&gt; to &lt;em&gt;8.78&lt;/em&gt;
            &lt;/li&gt;
          &lt;/ul&gt;
        &lt;p&gt;
Continuing the upgrade:
&lt;/p&gt;
&lt;pre class="wiki"&gt;apt-get dist-upgrade
reboot
&lt;/pre&gt;&lt;p&gt;
Install some more packages:
&lt;/p&gt;
&lt;pre class="wiki"&gt;aptitude install sudo s3ql
&lt;/pre&gt;&lt;p&gt;
Set up &lt;tt&gt;ssh&lt;/tt&gt; so the server can mount the GreenQloud servers:
&lt;/p&gt;
&lt;pre class="wiki"&gt;ssh-keygen -t rsa -b 2048
&lt;/pre&gt;&lt;p&gt;
Add the public key to the GreenQloud servers, prefixed with the &lt;tt&gt;crin3.crin.org&lt;/tt&gt; IP address:
&lt;/p&gt;
&lt;pre class="wiki"&gt;from="93.95.228.198" ssh-rsa AAA...
&lt;/pre&gt;&lt;p&gt;
Create a &lt;tt&gt;/root/.ssh/config&lt;/tt&gt; file with all the servers in it, create mount points for the servers:
&lt;/p&gt;
&lt;pre class="wiki"&gt;mkdir /media/db1.crin.org
mkdir /media/web1.crin.org
mkdir /media/web2.crin.org
mkdir /media/wiki.crin.org
&lt;/pre&gt;&lt;p&gt;
Mount the live database server:
&lt;/p&gt;
&lt;pre class="wiki"&gt;sshfs db1:/ /media/db1.crin.org/
root@crin3:~# df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/dm-0        15G  1.2G   13G   9% /
udev             10M     0   10M   0% /dev
tmpfs            99M  4.4M   95M   5% /run
tmpfs           248M     0  248M   0% /dev/shm
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs           248M     0  248M   0% /sys/fs/cgroup
/dev/sda1       236M   33M  191M  15% /boot
db1:/           9.4G  2.3G  6.6G  26% /media/db1.crin.org
&lt;/pre&gt;&lt;p&gt;
Change the &lt;tt&gt;sshd_config&lt;/tt&gt; on &lt;a class="wiki" href="https://trac.crin.org/trac/wiki/Crin1"&gt;Crin1&lt;/a&gt; and restart &lt;tt&gt;ssh&lt;/tt&gt;
&lt;/p&gt;
&lt;pre class="wiki"&gt;#PermitRootLogin no
PermitRootLogin without-password
&lt;/pre&gt;&lt;p&gt;
So that the &lt;tt&gt;/root/.s3ql&lt;/tt&gt; directory can copied:
&lt;/p&gt;
&lt;pre class="wiki"&gt;mkdir .s3ql
chmod 700 .s3ql/
rsync -av crin1:.s3ql/ .s3ql/
rm .s3ql/*log*
&lt;/pre&gt;&lt;p&gt;
Try mounting the s3ql space:
&lt;/p&gt;
&lt;pre class="wiki"&gt;mkdir /media/crin-gq-db1
chmod 700 /media/crin-gq-db1
mount.s3ql --cachedir /var/s3ql --authfile /root/.s3ql/authinfo2.db1 --allow-root s3c://s.qstack.advania.com:443/crin-gq-db1 /media/crin-gq-db1
  Using 2 upload threads (memory limited).
  Autodetected 65498 file descriptors available for cache entries
  Backend reports that fs is still mounted elsewhere, aborting.
&lt;/pre&gt;&lt;p&gt;
So check it is not mounted elsewhere, on &lt;a class="wiki" href="https://trac.crin.org/trac/wiki/Crin1"&gt;Crin1&lt;/a&gt;:
&lt;/p&gt;
&lt;pre class="wiki"&gt;umount.s3ql /media/crin-gq-db1
  /media/crin-gq-db1 is not on an S3QL file system
&lt;/pre&gt;&lt;p&gt;
Based on the &lt;a class="ext-link" href="https://bitbucket.org/nikratio/s3ql/wiki/FAQ"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;FAQ&lt;/a&gt; it should be safe to run &lt;tt&gt;fsck&lt;/tt&gt;, so copy all the scripts over:
&lt;/p&gt;
&lt;pre class="wiki"&gt;cd /usr/local/bin
rsync -av crin1:/usr/local/bin/backup* .
rsync -av crin1:/usr/local/bin/mnt* .
rsync -av crin1:/usr/local/bin/umnt* .
rsync -av crin2:/usr/local/bin/backup* .
rsync -av crin2:/usr/local/bin/mnt* .
rsync -av crin2:/usr/local/bin/umnt* .
scp crin2:/root/.s3ql/authinfo2.web1 /root/.s3ql/
&lt;/pre&gt;&lt;p&gt;
Filesystem check:
&lt;/p&gt;
&lt;pre class="wiki"&gt;umnt-s3ql-db1
  /media/crin-gq-db1 is not on an S3QL file system
  Starting fsck of s3c://s.qstack.advania.com:443/crin-gq-db1/
  File system revision too old, please run `s3qladm upgrade` first.
s3qladm --cachedir /var/s3ql --authfile /root/.s3ql/authinfo2.db1 upgrade s3c://s.qstack.advania.com:443/crin-gq-db1
  Getting file system parameters..
  Backend reports that fs is still mounted. If this is not the case, the
  file system may have not been unmounted cleanly or the data from the
  most-recent mount may have not yet propagated through the backend. In
  the later case, waiting for a while should fix the problem, in the
  former case you should try to run fsck on the computer where the file
  system has been mounted most recently.
  The last S3QL version that supported this file system revision
  was 2.12. To run this version's fsck.s3ql, proceed along
  the following steps:
    $ wget http://s3ql.googlecode.com/files/s3ql-2.12.tar.bz2             || wget https://bitbucket.org/nikratio/s3ql/downloads/s3ql-2.12.tar.bz2
    $ tar xjf s3ql-2.12.tar.bz2
    $ (cd s3ql-2.12; ./setup.py build_ext)
    $ s3ql-2.12/bin/fsck.s3ql &amp;lt;options&amp;gt;
&lt;/pre&gt;&lt;p&gt;
So, we are stuck, we get an error doing a &lt;tt&gt;fsck&lt;/tt&gt; with the old &lt;tt&gt;s3ql&lt;/tt&gt; and the new &lt;tt&gt;s3ql&lt;/tt&gt; wants us to run the old version, so I think the way forward is to delete the bucket and start again.
&lt;/p&gt;
&lt;p&gt;
However there isn't a delete bucket option I can find at &lt;a class="ext-link" href="https://qstack.advania.com/storage"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;https://qstack.advania.com/storage&lt;/a&gt; so a new one was created called &lt;tt&gt;crin-greenqloud-db1&lt;/tt&gt; and &lt;tt&gt;~/.s3ql/authinfo2.greenqloud.db1&lt;/tt&gt; was created and a filesystem was created:
&lt;/p&gt;
&lt;pre class="wiki"&gt;mkfs.s3ql --cachedir /var/s3ql --authfile /root/.s3ql/authinfo2.greenqloud.db1 s3c://s.qstack.advania.com:443/crin-greenqloud-db1
  Before using S3QL, make sure to read the user's guide, especially
  the 'Important Rules to Avoid Loosing Data' section.
  Enter encryption password:
  Confirm encryption password:
  Generating random encryption key...
  Creating metadata tables...
  Dumping metadata...
  ..objects..
  ..blocks..
  ..inodes..
  ..inode_blocks..
  ..symlink_targets..
  ..names..
  ..contents..
  ..ext_attributes..
  Compressing and uploading metadata...
  Wrote 151 bytes of compressed metadata.
  Please store the following master key in a safe location. It allows
  decryption of the S3QL file system in case the storage objects holding
  this information get corrupted:
  ---BEGIN MASTER KEY---
  XXX
  ---END MASTER KEY---
&lt;/pre&gt;&lt;p&gt;
The encryption password was saved to &lt;tt&gt;/root/.s3ql/authinfo2.greenqloud.db1&lt;/tt&gt;, the mounting and unmounting scripts were edited and the filesystem was mounted:
&lt;/p&gt;
&lt;pre class="wiki"&gt;mkdir /media/crin-greenqloud-db1
chmod 700 /media/crin-greenqloud-db1
mnt-s3ql-db1
&lt;/pre&gt;&lt;p&gt;
And the backup was started:
&lt;/p&gt;
&lt;pre class="wiki"&gt;screen
backup-s3ql-db1
&lt;/pre&gt;&lt;p&gt;
This will take a while to run... I'll check back on it later.
&lt;/p&gt;
&lt;p&gt;
If it goes OK then TODO:
&lt;/p&gt;
&lt;ol&gt;&lt;li&gt;Create new buckets for the other servers
&lt;/li&gt;&lt;li&gt;Edit the backups scripts for the new buckets
&lt;/li&gt;&lt;li&gt;Run all the backups
&lt;/li&gt;&lt;li&gt;Cron all the backups
&lt;/li&gt;&lt;li&gt;Ask Advania to delete the unneeded buckets
&lt;/li&gt;&lt;li&gt;Setup &lt;tt&gt;munin-node&lt;/tt&gt;
&lt;/li&gt;&lt;li&gt;Setup &lt;tt&gt;iptables-persistent&lt;/tt&gt;
&lt;/li&gt;&lt;li&gt;Document the backup setup
&lt;/li&gt;&lt;/ol&gt;
      </description>
      <category>Ticket</category>
    </item><item>
      
        <dc:creator>chris</dc:creator>

      <pubDate>Tue, 02 Jun 2015 13:34:35 GMT</pubDate>
      <title>hours, totalhours changed</title>
      <link>https://trac.crin.org/trac/ticket/11#comment:13</link>
      <guid isPermaLink="false">https://trac.crin.org/trac/ticket/11#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;0.25&lt;/em&gt;
            &lt;/li&gt;
            &lt;li&gt;&lt;strong&gt;totalhours&lt;/strong&gt;
                changed from &lt;em&gt;8.78&lt;/em&gt; to &lt;em&gt;9.03&lt;/em&gt;
            &lt;/li&gt;
          &lt;/ul&gt;
        &lt;p&gt;
That backup failed:
&lt;/p&gt;
&lt;pre class="wiki"&gt;rsync: write failed on "/media/crin-greenqloud-db1/latest/media/db1.crin.org/var/backups/mysql/databases/crin/field_data_body.sql": Transport endpoint is not connected (107)
rsync error: error in file IO (code 11) at receiver.c(393) [receiver=3.1.1]
&lt;/pre&gt;&lt;p&gt;
Trying to recover and re-run:
&lt;/p&gt;
&lt;pre class="wiki"&gt;umnt-s3ql-db1
  Uncaught top-level exception:
  Traceback (most recent call last):
    File "/usr/bin/umount.s3ql", line 9, in &amp;lt;module&amp;gt;
      load_entry_point('s3ql==2.13', 'console_scripts', 'umount.s3ql')()
    File "/usr/lib/s3ql/s3ql/umount.py", line 178, in main
      assert_s3ql_mountpoint(options.mountpoint)
    File "/usr/lib/s3ql/s3ql/common.py", line 279, in assert_s3ql_mountpoint
      ctrlfile = assert_s3ql_fs(mountpoint)
    File "/usr/lib/s3ql/s3ql/common.py", line 244, in assert_s3ql_fs
      if not (CTRL_NAME not in llfuse.listdir(path)
    File "fuse_api.pxi", line 42, in llfuse.capi.listdir (src/llfuse/capi_linux.c:19758)
  OSError: [Errno 107] Transport endpoint is not connected: '/media/crin-greenqloud-db1'
  Can not check mounted file system.
umnt-s3ql-db1 --force
  mount.s3ql: no process found
  Starting fsck of s3c://s.qstack.advania.com:443/crin-greenqloud-db1/
  Using cached metadata.
  Remote metadata is outdated.
  Checking DB integrity...
  Creating temporary extra indices...
  Checking lost+found...
  Checking cached objects...
  Committing block 0 of inode 77 to backend
  ...
  Unexpected server reply: expected XML, got:
  200 OK
  x-amz-meta-006: 'format_version': 2,
  x-amz-meta-007: 'compression': 'None',
  Content-Length: 0
  x-amz-meta-005: 'encryption': 'AES_v2',
  x-amz-meta-002: 'data': XXX
  x-amz-meta-003: XXX
  x-amz-meta-000: 'object_id': 's3ql_metadata_bak_1',
  x-amz-meta-001: 'nonce': XXX
  x-amz-id-2: XXX
  x-amz-meta-md5: XXX
  x-amz-meta-004: 'signature': XXX
  Last-Modified: Tue, 02 Jun 2015 13:27:06 GMT
  ETag: "XXX"
  x-amz-request-id: XXX
  x-amz-meta-format: raw2
  Content-Type: text/html; charset="UTF-8"
  X-Trans-Id: XXX
  Date: Tue, 02 Jun 2015 13:27:06 +0000
  Connection: keep-alive
  Uncaught top-level exception:
  Traceback (most recent call last):
    File "/usr/bin/fsck.s3ql", line 9, in &amp;lt;module&amp;gt;
      load_entry_point('s3ql==2.13', 'console_scripts', 'fsck.s3ql')()
    File "/usr/lib/s3ql/s3ql/fsck.py", line 1307, in main
      cycle_metadata(backend)
    File "/usr/lib/s3ql/s3ql/metadata.py", line 121, in cycle_metadata
      cycle_fn("s3ql_metadata_bak_%d" % i, "s3ql_metadata_bak_%d" % (i + 1))
    File "/usr/lib/s3ql/s3ql/backends/comprenc.py", line 291, in copy
      self._copy_or_rename(src, dest, rename=False, metadata=metadata)
    File "/usr/lib/s3ql/s3ql/backends/comprenc.py", line 325, in _copy_or_rename
      self.backend.copy(src, dest, metadata=meta_raw)
    File "/usr/lib/s3ql/s3ql/backends/common.py", line 52, in wrapped
      return method(*a, **kw)
    File "/usr/lib/s3ql/s3ql/backends/s3c.py", line 404, in copy
      root = self._parse_xml_response(resp, body)
    File "/usr/lib/s3ql/s3ql/backends/s3c.py", line 554, in _parse_xml_response
      raise RuntimeError('Unexpected server response')
  RuntimeError: Unexpected server response
&lt;/pre&gt;&lt;p&gt;
So I'm afraid using the Debian Stretch version of s3ql hasn't fixed the problem.
&lt;/p&gt;
&lt;p&gt;
If you want me to continue to try to get &lt;tt&gt;s3ql&lt;/tt&gt; storage working with advania.com then I'll have to raise a issue both with the developer of s3ql and also with advania and I have no idea how long this might take to resolve.
&lt;/p&gt;
&lt;p&gt;
If you need a quick alternative then I can suggest the &lt;a class="ext-link" href="https://www.webarch.net/backups"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;Webarchitects backup space&lt;/a&gt; -- this could be setup quickly, I don't think s3ql backups using advania can be.
&lt;/p&gt;
      </description>
      <category>Ticket</category>
    </item><item>
      
        <dc:creator>chris</dc:creator>

      <pubDate>Tue, 02 Jun 2015 16:26:14 GMT</pubDate>
      <title>hours, totalhours changed</title>
      <link>https://trac.crin.org/trac/ticket/11#comment:14</link>
      <guid isPermaLink="false">https://trac.crin.org/trac/ticket/11#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.3&lt;/em&gt;
            &lt;/li&gt;
            &lt;li&gt;&lt;strong&gt;totalhours&lt;/strong&gt;
                changed from &lt;em&gt;9.03&lt;/em&gt; to &lt;em&gt;9.33&lt;/em&gt;
            &lt;/li&gt;
          &lt;/ul&gt;
        &lt;p&gt;
Some questions from Jonas:
&lt;/p&gt;
&lt;blockquote class="citation"&gt;
&lt;p&gt;
Could we have not anticipated that before choosing Advania for backups?
&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;
I don't think so, the Advania software stack has been built by GreenQloud and they support &lt;tt&gt;s3ql&lt;/tt&gt;. With hindsight we could have asked some of &lt;a class="ext-link" href="http://www.rath.org/s3ql-docs/durability.html"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;the durability and consistency questions&lt;/a&gt;, but I'm not sure that the problem is related to these matters.
&lt;/p&gt;
&lt;blockquote class="citation"&gt;
&lt;p&gt;
If s3ql storage is currently not supported by Advania, it seems that we made a bad decision.
&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;
We were not to know that these problems would arise, the Advania site hosts a &lt;tt&gt;s3ql&lt;/tt&gt; how to that I originally &lt;a class="ext-link" href="https://greenqloud.zendesk.com/entries/44611757-How-To-Use-S3QL-to-mount-a-StorageQloud-bucket-on-Debian-7-Wheezy-"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;wrote for GreenQloud&lt;/a&gt; (you have to login to access it, but the login doesn't appear to be working right now so I can't get the URL of the article) -- I'm sure they would appreciate feedback regarding the problems we have been having and would be happy to work with us to help resolve the problem. The same goes for the &lt;tt&gt;s3ql&lt;/tt&gt; developer and I'd be very happy to work on resolving this problem the only problem with trying to fix it is that it will take some time to resolve and I don't know how much time.
&lt;/p&gt;
&lt;blockquote class="citation"&gt;
&lt;p&gt;
Is this putting us back into the issue of having to choose a different place or can we have a different *kind *of backup running at Advania?
&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;
Yes that is a possibility, but no other S3 storage system supports the key things that &lt;tt&gt;s3ql&lt;/tt&gt; offers:
&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;&lt;a class="ext-link" href="http://www.rath.org/s3ql-docs/about.html#features"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;Encryption and Data De-duplication&lt;/a&gt;
&lt;/li&gt;&lt;li&gt;&lt;a class="ext-link" href="http://www.rath.org/s3ql-docs/special.html"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;Snapshotting and Copy-on-Write&lt;/a&gt;
&lt;/li&gt;&lt;li&gt;&lt;a class="ext-link" href="http://www.rath.org/s3ql-docs/special.html#immutable-trees"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;Immutable Trees&lt;/a&gt;
&lt;/li&gt;&lt;/ul&gt;
      </description>
      <category>Ticket</category>
    </item><item>
      
        <dc:creator>chris</dc:creator>

      <pubDate>Fri, 05 Jun 2015 19:20:19 GMT</pubDate>
      <title></title>
      <link>https://trac.crin.org/trac/ticket/11#comment:15</link>
      <guid isPermaLink="false">https://trac.crin.org/trac/ticket/11#comment:15</guid>
      <description>
        &lt;p&gt;
The plan is to use the GreenCloud servers as backup servers for the time being, I'll try to sort this out over the weekend or early next week. &lt;a class="wiki" href="https://trac.crin.org/trac/wiki/Crin1"&gt;Crin1&lt;/a&gt; is now live for ownCloud, &lt;a class="ext-link" href="https://cloud.crin.org/"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;https://cloud.crin.org/&lt;/a&gt; and Piwik, &lt;a class="ext-link" href="https://stats.crin.org/"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;https://stats.crin.org/&lt;/a&gt;
&lt;/p&gt;
      </description>
      <category>Ticket</category>
    </item><item>
      
        <dc:creator>chris</dc:creator>

      <pubDate>Fri, 05 Jun 2015 19:20:51 GMT</pubDate>
      <title>cc changed</title>
      <link>https://trac.crin.org/trac/ticket/11#comment:16</link>
      <guid isPermaLink="false">https://trac.crin.org/trac/ticket/11#comment:16</guid>
      <description>
          &lt;ul&gt;
            &lt;li&gt;&lt;strong&gt;cc&lt;/strong&gt;
              &lt;em&gt;jenny&lt;/em&gt; &lt;em&gt;gillian&lt;/em&gt; added; &lt;em&gt;jonas&lt;/em&gt; removed
            &lt;/li&gt;
          &lt;/ul&gt;
        &lt;p&gt;
Ticket CCs updated.
&lt;/p&gt;
      </description>
      <category>Ticket</category>
    </item><item>
      
        <dc:creator>chris</dc:creator>

      <pubDate>Thu, 11 Jun 2015 13:53:27 GMT</pubDate>
      <title>hours, totalhours changed</title>
      <link>https://trac.crin.org/trac/ticket/11#comment:17</link>
      <guid isPermaLink="false">https://trac.crin.org/trac/ticket/11#comment:17</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.65&lt;/em&gt;
            &lt;/li&gt;
            &lt;li&gt;&lt;strong&gt;totalhours&lt;/strong&gt;
                changed from &lt;em&gt;9.33&lt;/em&gt; to &lt;em&gt;9.98&lt;/em&gt;
            &lt;/li&gt;
          &lt;/ul&gt;
        &lt;p&gt;
Setting up the GreenQloud &lt;tt&gt;crin-web1&lt;/tt&gt; server up to host backups:
&lt;/p&gt;
&lt;pre class="wiki"&gt;sudo -i
mkdir /var/backups/1984
mkdir /var/backups/1984/crin1
mkdir /var/backups/1984/crin2
mkdir /var/backups/1984/crin3
chmod 700 /var/backups/1984
&lt;/pre&gt;&lt;p&gt;
The &lt;tt&gt;/etc/ssh/sshd_config&lt;/tt&gt; file was edited:
&lt;/p&gt;
&lt;pre class="wiki"&gt;#PermitRootLogin yes
PermitRootLogin without-password
&lt;/pre&gt;&lt;p&gt;
And the public ssh keys from &lt;a class="wiki" href="https://trac.crin.org/trac/wiki/Crin1"&gt;Crin1&lt;/a&gt;, &lt;a class="wiki" href="https://trac.crin.org/trac/wiki/Crin2"&gt;Crin2&lt;/a&gt; and &lt;a class="wiki" href="https://trac.crin.org/trac/wiki/Crin3"&gt;Crin3&lt;/a&gt; were added to &lt;tt&gt;/root/.ssh/authorized_keys&lt;/tt&gt; prefixed with the server IP addresses, eg:
&lt;/p&gt;
&lt;pre class="wiki"&gt;from="93.95.228.179" ssh-rsa AAAA...
&lt;/pre&gt;&lt;p&gt;
On the &lt;tt&gt;crin-db1&lt;/tt&gt; server the MySQL database are dumped with a file per directory as there were problems uploading very big SQL files using s3ql, so this script, was copied to &lt;a class="wiki" href="https://trac.crin.org/trac/wiki/Crin1"&gt;Crin1&lt;/a&gt; and it has been posted to &lt;a class="wiki" href="https://trac.crin.org/trac/wiki/DumpMysqlTables"&gt;wiki:DumpMysqlTables&lt;/a&gt;, it was copied to the server as &lt;tt&gt;/usr/local/bin/backup-mysql&lt;/tt&gt; and run, and the backup directory was set to only be readable by root (the script should really sort this out):
&lt;/p&gt;
&lt;pre class="wiki"&gt;chmod 700 /var/backups/mysql/databases/
&lt;/pre&gt;&lt;p&gt;
It was set to run at 1am every morning:
&lt;/p&gt;
&lt;pre class="wiki"&gt;# m h  dom mon dow   command
01 01 * * * /usr/local/bin/backup-mysql
&lt;/pre&gt;&lt;p&gt;
And &lt;tt&gt;/usr/local/bin/rsync-backup&lt;/tt&gt; was created containing:
&lt;/p&gt;
&lt;pre class="wiki"&gt;#!/bin/bash
RSYNC="rsync -av"
DEST="web1:/var/backups/1984/crin1"
$RSYNC /var/backups/mysql/databases/ $DEST/var/backups/mysql/databases/
$RSYNC /etc/ $DEST/etc/
$RSYNC /var/www/ $DEST/www/
&lt;/pre&gt;&lt;p&gt;
The directories were created on crin-web1:
&lt;/p&gt;
&lt;pre class="wiki"&gt;mkdir -p /var/backups/1984/crin1/var/backups/mysql/databases
mkdir /var/backups/1984/crin1/etc
mkdir /var/backups/1984/crin1/www
&lt;/pre&gt;&lt;p&gt;
And then it was run in screen:
&lt;/p&gt;
&lt;pre class="wiki"&gt;screen
/usr/local/bin/rsync-backup
&lt;/pre&gt;&lt;p&gt;
I'll check back later to see it it completed OK. If it wall went well then the same things will need to be set up for &lt;a class="wiki" href="https://trac.crin.org/trac/wiki/Crin2"&gt;Crin2&lt;/a&gt; and &lt;a class="wiki" href="https://trac.crin.org/trac/wiki/Crin3"&gt;Crin3&lt;/a&gt;.
&lt;/p&gt;
      </description>
      <category>Ticket</category>
    </item><item>
      
        <dc:creator>chris</dc:creator>

      <pubDate>Fri, 12 Jun 2015 08:55:14 GMT</pubDate>
      <title>hours, totalhours changed</title>
      <link>https://trac.crin.org/trac/ticket/11#comment:18</link>
      <guid isPermaLink="false">https://trac.crin.org/trac/ticket/11#comment:18</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.15&lt;/em&gt;
            &lt;/li&gt;
            &lt;li&gt;&lt;strong&gt;totalhours&lt;/strong&gt;
                changed from &lt;em&gt;9.98&lt;/em&gt; to &lt;em&gt;10.13&lt;/em&gt;
            &lt;/li&gt;
          &lt;/ul&gt;
        &lt;p&gt;
The back seems to have run OK, so it has been added to the &lt;a class="wiki" href="https://trac.crin.org/trac/wiki/Crin1"&gt;Crin1&lt;/a&gt; root crontab:
&lt;/p&gt;
&lt;pre class="wiki"&gt;30 01 * * * /usr/local/bin/rsync-backup
&lt;/pre&gt;&lt;p&gt;
And the script was copied to &lt;a class="wiki" href="https://trac.crin.org/trac/wiki/Crin2"&gt;Crin2&lt;/a&gt; and edited:
&lt;/p&gt;
&lt;pre class="wiki"&gt;#!/bin/bash
RSYNC="rsync -av"
DEST="web1:/var/backups/1984/crin2"
$RSYNC /etc/ $DEST/etc/
$RSYNC /var/www/ $DEST/www/
&lt;/pre&gt;&lt;p&gt;
The destination directories were created on &lt;tt&gt;crin-web1&lt;/tt&gt; and the backup script was run in screen.
&lt;/p&gt;
      </description>
      <category>Ticket</category>
    </item><item>
      
        <dc:creator>chris</dc:creator>

      <pubDate>Fri, 12 Jun 2015 09:44:00 GMT</pubDate>
      <title>hours, totalhours changed</title>
      <link>https://trac.crin.org/trac/ticket/11#comment:19</link>
      <guid isPermaLink="false">https://trac.crin.org/trac/ticket/11#comment:19</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;totalhours&lt;/strong&gt;
                changed from &lt;em&gt;10.13&lt;/em&gt; to &lt;em&gt;10.23&lt;/em&gt;
            &lt;/li&gt;
          &lt;/ul&gt;
        &lt;p&gt;
We have run out of space in &lt;tt&gt;/var/&lt;/tt&gt; on the GreenQloud server, so changing it so that &lt;tt&gt;/var/www&lt;/tt&gt; on &lt;a class="wiki" href="https://trac.crin.org/trac/wiki/Crin2"&gt;Crin2&lt;/a&gt; is backed up to &lt;tt&gt;/var/www&lt;/tt&gt; on &lt;tt&gt;crin-web1&lt;/tt&gt;:
&lt;/p&gt;
&lt;pre class="wiki"&gt;mkdir /var/backups/1984/crin2/var
cd /var/backups/1984/crin2/var
ln -s /var/www
&lt;/pre&gt;&lt;p&gt;
And the script on &lt;a class="wiki" href="https://trac.crin.org/trac/wiki/Crin2"&gt;Crin2&lt;/a&gt; was changed:
&lt;/p&gt;
&lt;pre class="wiki"&gt;#!/bin/bash
RSYNC="rsync -av"
DEST="web1:/var/backups/1984/crin2"
$RSYNC /etc/ $DEST/etc/
$RSYNC /var/www/ $DEST/var/www/
&lt;/pre&gt;&lt;p&gt;
This means that the backups will overwrite the old files, which is fine unless something goes horribly wrong after switching to 1984.is and we need to switch back to GreenCloud... So the &lt;tt&gt;settings.php&lt;/tt&gt; file on &lt;tt&gt;crin-web1&lt;/tt&gt; was backed up:
&lt;/p&gt;
&lt;pre class="wiki"&gt;cp /var/www/crin/sites/default/settings.php /root/
&lt;/pre&gt;
      </description>
      <category>Ticket</category>
    </item><item>
      
        <dc:creator>gillian</dc:creator>

      <pubDate>Fri, 12 Jun 2015 11:35:04 GMT</pubDate>
      <title></title>
      <link>https://trac.crin.org/trac/ticket/11#comment:21</link>
      <guid isPermaLink="false">https://trac.crin.org/trac/ticket/11#comment:21</guid>
      <description>
        &lt;pre class="wiki"&gt;Hi Jenny,
A few hiccups with backup on GreenQloud but all ok now from my
understanding?
Thanks
On Friday, 12 June 2015, CRIN Trac &amp;lt;trac@trac.crin.org&amp;gt; wrote:
&amp;gt; #11: Set up backups
&amp;gt; -------------------------------------+-------------------------------------
&amp;gt;                  Reporter:  chris    |                Owner:  chris
&amp;gt;                      Type:  defect   |               Status:  new
&amp;gt;                  Priority:  major    |            Milestone:  Install and
&amp;gt;                                      |  configure crin1
&amp;gt;                 Component:  backups  |              Version:
&amp;gt;                Resolution:           |             Keywords:
&amp;gt; Estimated Number of Hours:  6        |  Add Hours to Ticket:  0.1
&amp;gt;                 Billable?:  1        |          Total Hours:  10.13
&amp;gt; -------------------------------------+-------------------------------------
&amp;gt; Changes (by chris):
&amp;gt;
&amp;gt;  * hours:  0 =&amp;gt; 0.1
&amp;gt;  * totalhours:  10.13 =&amp;gt; 10.23
&amp;gt;
&amp;gt;
&amp;gt; Comment:
&amp;gt;
&amp;gt;  We have run out of space in `/var/` on the !GreenQloud server, so changing
&amp;gt;  it so that `/var/www` on [[Crin2]] is backed up to `/var/www` on `crin-
&amp;gt;  web1`:
&amp;gt;
&amp;gt;  {{{
&amp;gt;  mkdir /var/backups/1984/crin2/var
&amp;gt;  cd /var/backups/1984/crin2/var
&amp;gt;  ln -s /var/www
&amp;gt;  }}}
&amp;gt;
&amp;gt;  And the script on [[Crin2]] was changed:
&amp;gt;
&amp;gt;  {{{
&amp;gt;  #!/bin/bash
&amp;gt;
&amp;gt;  RSYNC="rsync -av"
&amp;gt;  DEST="web1:/var/backups/1984/crin2"
&amp;gt;
&amp;gt;  $RSYNC /etc/ $DEST/etc/
&amp;gt;  $RSYNC /var/www/ $DEST/var/www/
&amp;gt;  }}}
&amp;gt;
&amp;gt;  This means that the backups will overwrite the old files, which is fine
&amp;gt;  unless something goes horribly wrong after switching to 1984.is and we
&amp;gt;  need to switch back to !GreenCloud... So the `settings.php` file on `crin-
&amp;gt;  web1` was backed up:
&amp;gt;
&amp;gt;  {{{
&amp;gt;  cp /var/www/crin/sites/default/settings.php /root/
&amp;gt;  }}}
&amp;gt;
&amp;gt; --
&amp;gt; Ticket URL: &amp;lt;https://trac.crin.org/trac/ticket/11#comment:19&amp;gt;
&amp;gt; CRIN Trac &amp;lt;https://trac.crin.org/trac&amp;gt;
&amp;gt; Trac project for CRIN website and servers.
&amp;gt;
--
Gillian Harrow
Organisational Development Manager
*Child Rights International Network - CRIN*
Unit W125-127, Westminster Business Square
1-45 Durham Street
London SE11 5JH
United Kingdom
E: gillian@crin.org
T: +44 (0)20 7401 2257
Website: www.crin.org
Twitter: @CRINwire
&lt;/pre&gt;
      </description>
      <category>Ticket</category>
    </item><item>
      
        <dc:creator>gillian</dc:creator>

      <pubDate>Fri, 12 Jun 2015 13:50:04 GMT</pubDate>
      <title></title>
      <link>https://trac.crin.org/trac/ticket/11#comment:22</link>
      <guid isPermaLink="false">https://trac.crin.org/trac/ticket/11#comment:22</guid>
      <description>
        &lt;pre class="wiki"&gt;Hi Chris,
I often find these tickets a bit confusing.
Please can you send Jenny and I an update on what the billable hours are
for the back up to Green Qloud.
I am looking at:
              Billable?:  1        |          Total Hours:  10.13
Many thanks,
Gillian
On 12 June 2015 at 10:44, CRIN Trac &amp;lt;trac@trac.crin.org&amp;gt; wrote:
&amp;gt; #11: Set up backups
&amp;gt; -------------------------------------+-------------------------------------
&amp;gt;                  Reporter:  chris    |                Owner:  chris
&amp;gt;                      Type:  defect   |               Status:  new
&amp;gt;                  Priority:  major    |            Milestone:  Install and
&amp;gt;                                      |  configure crin1
&amp;gt;                 Component:  backups  |              Version:
&amp;gt;                Resolution:           |             Keywords:
&amp;gt; Estimated Number of Hours:  6        |  Add Hours to Ticket:  0.1
&amp;gt;                 Billable?:  1        |          Total Hours:  10.13
&amp;gt; -------------------------------------+-------------------------------------
&amp;gt; Changes (by chris):
&amp;gt;
&amp;gt;  * hours:  0 =&amp;gt; 0.1
&amp;gt;  * totalhours:  10.13 =&amp;gt; 10.23
&amp;gt;
&amp;gt;
&amp;gt; Comment:
&amp;gt;
&amp;gt;  We have run out of space in `/var/` on the !GreenQloud server, so changing
&amp;gt;  it so that `/var/www` on [[Crin2]] is backed up to `/var/www` on `crin-
&amp;gt;  web1`:
&amp;gt;
&amp;gt;  {{{
&amp;gt;  mkdir /var/backups/1984/crin2/var
&amp;gt;  cd /var/backups/1984/crin2/var
&amp;gt;  ln -s /var/www
&amp;gt;  }}}
&amp;gt;
&amp;gt;  And the script on [[Crin2]] was changed:
&amp;gt;
&amp;gt;  {{{
&amp;gt;  #!/bin/bash
&amp;gt;
&amp;gt;  RSYNC="rsync -av"
&amp;gt;  DEST="web1:/var/backups/1984/crin2"
&amp;gt;
&amp;gt;  $RSYNC /etc/ $DEST/etc/
&amp;gt;  $RSYNC /var/www/ $DEST/var/www/
&amp;gt;  }}}
&amp;gt;
&amp;gt;  This means that the backups will overwrite the old files, which is fine
&amp;gt;  unless something goes horribly wrong after switching to 1984.is and we
&amp;gt;  need to switch back to !GreenCloud... So the `settings.php` file on `crin-
&amp;gt;  web1` was backed up:
&amp;gt;
&amp;gt;  {{{
&amp;gt;  cp /var/www/crin/sites/default/settings.php /root/
&amp;gt;  }}}
&amp;gt;
&amp;gt; --
&amp;gt; Ticket URL: &amp;lt;https://trac.crin.org/trac/ticket/11#comment:19&amp;gt;
&amp;gt; CRIN Trac &amp;lt;https://trac.crin.org/trac&amp;gt;
&amp;gt; Trac project for CRIN website and servers.
&amp;gt;
--
Gillian Harrow
Organisational Development Manager
*Child Rights International Network - CRIN*
Unit W125-127, Westminster Business Square
1-45 Durham Street
London SE11 5JH
United Kingdom
E: gillian@crin.org
T: +44 (0)20 7401 2257
Website: www.crin.org
Twitter: @CRINwire
&lt;/pre&gt;
      </description>
      <category>Ticket</category>
    </item><item>
      
        <dc:creator>chris</dc:creator>

      <pubDate>Fri, 12 Jun 2015 13:57:03 GMT</pubDate>
      <title></title>
      <link>https://trac.crin.org/trac/ticket/11#comment:23</link>
      <guid isPermaLink="false">https://trac.crin.org/trac/ticket/11#comment:23</guid>
      <description>
        &lt;p&gt;
Replying to &lt;a class="ticket" href="https://trac.crin.org/trac/ticket/11#comment:22" title="Comment 22"&gt;gillian&lt;/a&gt;:
&lt;/p&gt;
&lt;blockquote class="citation"&gt;
&lt;p&gt;
I often find these tickets a bit confusing.
&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;
Sorry about that.
&lt;/p&gt;
&lt;blockquote class="citation"&gt;
&lt;p&gt;
Please can you send Jenny and I an update on what the billable hours are
for the back up to Green Qloud.
I am looking at:
&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;
Billable?:  1        |          Total Hours:  10.13
&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;p&gt;
That is the total time for the ticket.
&lt;/p&gt;
&lt;p&gt;
Before I set up the backups to go to the GreenQloud server a total of 9h 19m of time had been recorded on this ticket, so approx 1 hour has been spent since, see the total hours here:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="https://trac.crin.org/trac/ticket/11#comment:17"&gt;https://trac.crin.org/trac/ticket/11#comment:17&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
I hope that is clear.
&lt;/p&gt;
      </description>
      <category>Ticket</category>
    </item><item>
      
        <dc:creator>gillian</dc:creator>

      <pubDate>Fri, 12 Jun 2015 14:05:03 GMT</pubDate>
      <title></title>
      <link>https://trac.crin.org/trac/ticket/11#comment:24</link>
      <guid isPermaLink="false">https://trac.crin.org/trac/ticket/11#comment:24</guid>
      <description>
        &lt;pre class="wiki"&gt;Yes, it is clear.
Thank you.
On 12 June 2015 at 14:57, CRIN Trac &amp;lt;trac@trac.crin.org&amp;gt; wrote:
&amp;gt; #11: Set up backups
&amp;gt; -------------------------------------+-------------------------------------
&amp;gt;                  Reporter:  chris    |                Owner:  chris
&amp;gt;                      Type:  defect   |               Status:  new
&amp;gt;                  Priority:  major    |            Milestone:  Install and
&amp;gt;                                      |  configure crin1
&amp;gt;                 Component:  backups  |              Version:
&amp;gt;                Resolution:           |             Keywords:
&amp;gt; Estimated Number of Hours:  6        |  Add Hours to Ticket:  0
&amp;gt;                 Billable?:  1        |          Total Hours:  10.23
&amp;gt; -------------------------------------+-------------------------------------
&amp;gt;
&amp;gt; Comment (by chris):
&amp;gt;
&amp;gt;  Replying to [comment:22 gillian]:
&amp;gt;  &amp;gt;
&amp;gt;  &amp;gt; I often find these tickets a bit confusing.
&amp;gt;
&amp;gt;  Sorry about that.
&amp;gt;
&amp;gt;  &amp;gt; Please can you send Jenny and I an update on what the billable hours are
&amp;gt;  &amp;gt; for the back up to Green Qloud.
&amp;gt;  &amp;gt; I am looking at:
&amp;gt;  &amp;gt;               Billable?:  1        |          Total Hours:  10.13
&amp;gt;
&amp;gt;  That is the total time for the ticket.
&amp;gt;
&amp;gt;  Before I set up the backups to go to the !GreenQloud server a total of 9h
&amp;gt;  19m of time had been recorded on this ticket, so approx 1 hour has been
&amp;gt;  spent since, see the total hours here:
&amp;gt;
&amp;gt;  https://trac.crin.org/trac/ticket/11#comment:17
&amp;gt;
&amp;gt;  I hope that is clear.
&amp;gt;
&amp;gt; --
&amp;gt; Ticket URL: &amp;lt;https://trac.crin.org/trac/ticket/11#comment:23&amp;gt;
&amp;gt; CRIN Trac &amp;lt;https://trac.crin.org/trac&amp;gt;
&amp;gt; Trac project for CRIN website and servers.
&amp;gt;
--
Gillian Harrow
Organisational Development Manager
*Child Rights International Network - CRIN*
Unit W125-127, Westminster Business Square
1-45 Durham Street
London SE11 5JH
United Kingdom
E: gillian@crin.org
T: +44 (0)20 7401 2257
Website: www.crin.org
Twitter: @CRINwire
&lt;/pre&gt;
      </description>
      <category>Ticket</category>
    </item><item>
      
        <dc:creator>chris</dc:creator>

      <pubDate>Tue, 30 Jun 2015 10:16:52 GMT</pubDate>
      <title></title>
      <link>https://trac.crin.org/trac/ticket/11#comment:25</link>
      <guid isPermaLink="false">https://trac.crin.org/trac/ticket/11#comment:25</guid>
      <description>
        &lt;p&gt;
Jenny / Gillian : is it OK if I spend up to 30 mins on this ticket checking that the backups are all working and shutting down the servers we no longer need at GreenQloud?
&lt;/p&gt;
      </description>
      <category>Ticket</category>
    </item><item>
      
        <dc:creator>gillian</dc:creator>

      <pubDate>Tue, 30 Jun 2015 12:15:06 GMT</pubDate>
      <title></title>
      <link>https://trac.crin.org/trac/ticket/11#comment:26</link>
      <guid isPermaLink="false">https://trac.crin.org/trac/ticket/11#comment:26</guid>
      <description>
        &lt;pre class="wiki"&gt;Hi Chris, Jenny
I haven't tested Piwik or OwnCloud and will not have an opportunity to do
that until after 9pm tonight.
Jenny, have you time to look in and then I will tonight?
Apologies,
Gillian
On 30 June 2015 at 11:16, CRIN Trac &amp;lt;trac@trac.crin.org&amp;gt; wrote:
&amp;gt; #11: Set up backups
&amp;gt; -------------------------------------+-------------------------------------
&amp;gt;                  Reporter:  chris    |                Owner:  chris
&amp;gt;                      Type:  defect   |               Status:  new
&amp;gt;                  Priority:  major    |            Milestone:  Install and
&amp;gt;                                      |  configure crin1
&amp;gt;                 Component:  backups  |              Version:
&amp;gt;                Resolution:           |             Keywords:
&amp;gt; Estimated Number of Hours:  6        |  Add Hours to Ticket:  0
&amp;gt;                 Billable?:  1        |          Total Hours:  10.23
&amp;gt; -------------------------------------+-------------------------------------
&amp;gt;
&amp;gt; Comment (by chris):
&amp;gt;
&amp;gt;  Jenny / Gillian : is it OK if I spend up to 30 mins on this ticket
&amp;gt;  checking that the backups are all working and shutting down the servers we
&amp;gt;  no longer need at GreenQloud?
&amp;gt;
&amp;gt; --
&amp;gt; Ticket URL: &amp;lt;https://trac.crin.org/trac/ticket/11#comment:25&amp;gt;
&amp;gt; CRIN Trac &amp;lt;https://trac.crin.org/trac&amp;gt;
&amp;gt; Trac project for CRIN website and servers.
&amp;gt;
--
Gillian Harrow
Organisational Development Manager
*Child Rights International Network - CRIN*
Unit W125-127, Westminster Business Square
1-45 Durham Street
London SE11 5JH
United Kingdom
E: gillian@crin.org
T: +44 (0)20 7401 2257
Website: www.crin.org
Twitter: @CRINwire
&lt;/pre&gt;
      </description>
      <category>Ticket</category>
    </item><item>
      
        <dc:creator>chris</dc:creator>

      <pubDate>Fri, 03 Jul 2015 09:53:29 GMT</pubDate>
      <title>hours, status, totalhours changed; resolution set</title>
      <link>https://trac.crin.org/trac/ticket/11#comment:27</link>
      <guid isPermaLink="false">https://trac.crin.org/trac/ticket/11#comment:27</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;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;wontfix&lt;/em&gt;
            &lt;/li&gt;
            &lt;li&gt;&lt;strong&gt;totalhours&lt;/strong&gt;
                changed from &lt;em&gt;10.23&lt;/em&gt; to &lt;em&gt;10.48&lt;/em&gt;
            &lt;/li&gt;
          &lt;/ul&gt;
        &lt;p&gt;
Closing this ticket as won't fix, email from Gillian:
&lt;/p&gt;
&lt;blockquote class="citation"&gt;
&lt;p&gt;
1984 makes backups of our data
&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;
So on &lt;a class="wiki" href="https://trac.crin.org/trac/wiki/Crin1"&gt;Crin1&lt;/a&gt; this cron job was commented out:
&lt;/p&gt;
&lt;pre class="wiki"&gt;#30 01 * * * /usr/local/bin/rsync-backup
&lt;/pre&gt;&lt;p&gt;
The following one which dumps a copy of the MySQL database into plain text files was kept as this will ensure that 1984 backups contain restorable copies of the databases.
&lt;/p&gt;
&lt;pre class="wiki"&gt;01 01 * * * /usr/local/bin/backup-mysql
&lt;/pre&gt;&lt;p&gt;
The Crin3 server can be also be shutdown.
&lt;/p&gt;
      </description>
      <category>Ticket</category>
    </item><item>
      
        <dc:creator>chris</dc:creator>

      <pubDate>Mon, 20 Jul 2015 15:58:31 GMT</pubDate>
      <title>hours, status, totalhours changed; resolution deleted</title>
      <link>https://trac.crin.org/trac/ticket/11#comment:28</link>
      <guid isPermaLink="false">https://trac.crin.org/trac/ticket/11#comment:28</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;status&lt;/strong&gt;
                changed from &lt;em&gt;closed&lt;/em&gt; to &lt;em&gt;reopened&lt;/em&gt;
            &lt;/li&gt;
            &lt;li&gt;&lt;strong&gt;resolution&lt;/strong&gt;
                &lt;em&gt;wontfix&lt;/em&gt; deleted
            &lt;/li&gt;
            &lt;li&gt;&lt;strong&gt;totalhours&lt;/strong&gt;
                changed from &lt;em&gt;10.48&lt;/em&gt; to &lt;em&gt;10.98&lt;/em&gt;
            &lt;/li&gt;
          &lt;/ul&gt;
        &lt;p&gt;
I have re-opened this ticket, regarding how much data there is to backup:
&lt;/p&gt;
&lt;h2 id="Crin1"&gt;Crin1&lt;/h2&gt;
&lt;pre class="wiki"&gt;196K    ./usr/local
7.1M    ./etc
695M    ./home
1.5G    ./root
1.5G    ./var/backups
672M    ./var/www
5G       TOTAL
&lt;/pre&gt;&lt;h2 id="Crin2"&gt;Crin2&lt;/h2&gt;
&lt;pre class="wiki"&gt;6.2M    ./root
7.2M    ./etc
268K    ./home
20G     ./var/www
8.4M    ./var/backups
13M     ./usr/local
21G TOTAL
&lt;/pre&gt;&lt;h2 id="Crin4"&gt;Crin 4&lt;/h2&gt;
&lt;pre class="wiki"&gt;184K    ./home
6.8M    ./etc
2.1M    ./root
31M     ./var/www
14M     ./usr/local
100M TOTAL
&lt;/pre&gt;&lt;p&gt;
We could use rdiff-backup via &lt;a class="ext-link" href="https://labs.riseup.net/code/projects/backupninja"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;backupninja&lt;/a&gt; to another virtual server. A 4 unit VPS with 32G of space would be the minimum needed, but wouldn't give much space to grow, a 6 unit VPS with 48G of space might make more sense (£47.94 per month) the CRIN3 server would also not be needed with this approach, so could be replaced by a backup server.
&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;&lt;a class="ext-link" href="https://1984hosting.com/product/vps/"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;https://1984hosting.com/product/vps/&lt;/a&gt;
&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;
The reason I have advised against a solution like this in the past is cost -- it is far more expensive per G of space compared with, for example Advania OpenCloud - Storage, which is from  0,11$ per G per month, so 48G of space there would be about £3.40 per month:
&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;&lt;a class="ext-link" href="http://www.advania.com/datacentres/solutions/advania-cloud-services/"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;http://www.advania.com/datacentres/solutions/advania-cloud-services/&lt;/a&gt;
&lt;/li&gt;&lt;/ul&gt;
      </description>
      <category>Ticket</category>
    </item><item>
      
        <dc:creator>chris</dc:creator>

      <pubDate>Wed, 22 Jul 2015 16:11:58 GMT</pubDate>
      <title>hours, totalhours changed</title>
      <link>https://trac.crin.org/trac/ticket/11#comment:29</link>
      <guid isPermaLink="false">https://trac.crin.org/trac/ticket/11#comment:29</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;10.98&lt;/em&gt; to &lt;em&gt;11.48&lt;/em&gt;
            &lt;/li&gt;
          &lt;/ul&gt;
        &lt;p&gt;
I have just sent the following email to info@…:
&lt;/p&gt;
&lt;pre class="wiki"&gt;Date: Wed, 22 Jul 2015 16:48:37 +0100
From: Chris Croome &amp;lt;chris@webarchitects.co.uk&amp;gt;
To: info@advania.com
Subject: Problem with Advania OpenCloud Storage and S3QL
Hi
I have been trying to set up a backup solution for CRIN
(https://www.crin.org/) using S3QL and your S3 OpenCloud Storage but
have this error:
- https://trac.crin.org/trac/ticket/11#comment:13
I don't know if this is an issue with S3QL or your servers, I'll also
raise it with the S3QL developer.
Do you have any advice? I'd be happy to work with you to resolve this
issue.
All the best
Chris
&lt;/pre&gt;&lt;p&gt;
I have also &lt;a class="ext-link" href="https://bitbucket.org/nikratio/s3ql/issues/151/problem-with-advania-s3-storage-space"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;opened a ticket at the S3QL project site&lt;/a&gt;:
&lt;/p&gt;
&lt;blockquote class="citation"&gt;
&lt;h2 id="ProblemwithAdvaniaS3storagespace"&gt;Problem with Advania S3 storage space&lt;/h2&gt;
&lt;p&gt;
I have been trying to use the Debian S3QL package to backup data to Advania S3 storage space, &lt;a class="ext-link" href="http://www.advania.com/datacentres/solutions/advania-cloud-services/"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;http://www.advania.com/datacentres/solutions/advania-cloud-services/&lt;/a&gt; and using Debian 8, Jessie, I came across this issue:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="https://trac.crin.org/trac/ticket/11#comment:8"&gt;https://trac.crin.org/trac/ticket/11#comment:8&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
Which was solved here:
&lt;/p&gt;
&lt;p&gt;
&lt;a class="ext-link" href="https://bitbucket.org/nikratio/s3ql/commits/dd846bab60fc"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;https://bitbucket.org/nikratio/s3ql/commits/dd846bab60fc&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
So I switched to using the Debian unstable version of S3QL and that solved this issue but I then had another problem:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="https://trac.crin.org/trac/ticket/11#comment:13"&gt;https://trac.crin.org/trac/ticket/11#comment:13&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
I don't know if this is a Advania or a S3QL issue, I have emailed them to ask. Do you have any suggestions how I might get this working?
&lt;/p&gt;
&lt;/blockquote&gt;
      </description>
      <category>Ticket</category>
    </item><item>
      
        <dc:creator>chris</dc:creator>

      <pubDate>Thu, 23 Jul 2015 11:33:57 GMT</pubDate>
      <title>hours, totalhours changed</title>
      <link>https://trac.crin.org/trac/ticket/11#comment:30</link>
      <guid isPermaLink="false">https://trac.crin.org/trac/ticket/11#comment:30</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.45&lt;/em&gt;
            &lt;/li&gt;
            &lt;li&gt;&lt;strong&gt;totalhours&lt;/strong&gt;
                changed from &lt;em&gt;11.48&lt;/em&gt; to &lt;em&gt;13.93&lt;/em&gt;
            &lt;/li&gt;
          &lt;/ul&gt;
        &lt;p&gt;
Starting from the beginning again...
&lt;/p&gt;
&lt;p&gt;
The servers that need backing up are &lt;a class="wiki" href="https://trac.crin.org/trac/wiki/Crin1"&gt;Crin1&lt;/a&gt;, &lt;a class="wiki" href="https://trac.crin.org/trac/wiki/Crin2"&gt;Crin2&lt;/a&gt; and &lt;a class="wiki" href="https://trac.crin.org/trac/wiki/Crin4"&gt;Crin4&lt;/a&gt;, and the server we are going to use to do the backups is &lt;a class="wiki" href="https://trac.crin.org/trac/wiki/Crin3"&gt;Crin3&lt;/a&gt;. So on &lt;a class="wiki" href="https://trac.crin.org/trac/wiki/Crin3"&gt;Crin3&lt;/a&gt; the other 3 server files systems were mounted (after creating mount points and setting up the ssh keys and the ssh config file):
&lt;/p&gt;
&lt;pre class="wiki"&gt;sshfs crin1:/ /media/crin1/
sshfs crin2:/ /media/crin2/
sshfs crin4:/ /media/crin4/
&lt;/pre&gt;&lt;p&gt;
A new bucket was created for each server, at &lt;a class="ext-link" href="https://qstack.advania.com/storage"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;Advania&lt;/a&gt; eg:
&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;crin1
&lt;/li&gt;&lt;li&gt;crin2
&lt;/li&gt;&lt;li&gt;crin4
&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;
File systems were created:
&lt;/p&gt;
&lt;pre class="wiki"&gt;mkfs.s3ql --cachedir /var/s3ql --authfile /root/.s3ql/authinfo2 s3c://s.qstack.advania.com:443/crin1
mkfs.s3ql --cachedir /var/s3ql --authfile /root/.s3ql/authinfo2 s3c://s.qstack.advania.com:443/crin2
mkfs.s3ql --cachedir /var/s3ql --authfile /root/.s3ql/authinfo2 s3c://s.qstack.advania.com:443/crin4
&lt;/pre&gt;&lt;p&gt;
The &lt;tt&gt;/root/.s3ql/authinfo2&lt;/tt&gt; file was edited following the &lt;a class="ext-link" href="http://www.rath.org/s3ql-docs/authinfo.html"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;documentation&lt;/a&gt;:
&lt;/p&gt;
&lt;pre class="wiki"&gt;[s3c]
storage-url: s3c://s.qstack.advania.com:443/
backend-login: XXX
backend-password: XXX
[crin1]
storage-url: s3c://s.qstack.advania.com:443/crin1
fs-passphrase: XXX
[crin2]
storage-url: s3c://s.qstack.advania.com:443/crin2
fs-passphrase: XXX
[crin4]
storage-url: s3c://s.qstack.advania.com:443/crin4
fs-passphrase: XXX
&lt;/pre&gt;&lt;p&gt;
Create directories for mounting the S3QL filesystem, &lt;tt&gt;/media/s3ql/crin1&lt;/tt&gt; etc. and mount:
&lt;/p&gt;
&lt;pre class="wiki"&gt;mount.s3ql --cachedir /var/s3ql --authfile /root/.s3ql/authinfo2 --allow-root s3c://s.qstack.advania.com:443/crin1 /media/s3ql/crin1
mount.s3ql --cachedir /var/s3ql --authfile /root/.s3ql/authinfo2 --allow-root s3c://s.qstack.advania.com:443/crin2 /media/s3ql/crin2
mount.s3ql --cachedir /var/s3ql --authfile /root/.s3ql/authinfo2 --allow-root s3c://s.qstack.advania.com:443/crin4 /media/s3ql/crin4
&lt;/pre&gt;&lt;p&gt;
That seems fine, unmount them again:
&lt;/p&gt;
&lt;pre class="wiki"&gt;umount.s3ql /media/s3ql/crin1
umount.s3ql /media/s3ql/crin2
umount.s3ql /media/s3ql/crin4
&lt;/pre&gt;&lt;p&gt;
Previously scripts written for GreenQloud were use to mount the directories and run the backups, but since there is a &lt;a class="ext-link" href="http://www.rath.org/s3ql-docs/contrib.html#s3-backup-sh"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;s3_backup.sh script&lt;/a&gt; this was copied to &lt;tt&gt;/usr/local/bin/s3ql_backup&lt;/tt&gt; and amended so the server / bucket can be passed to it on the command line and also so it reads a list of directories to backup from a file:
&lt;/p&gt;
&lt;pre class="wiki"&gt;#!/bin/bash
# Abort entire script if any command fails
set -e
# This script assumes that bucketname and directory under
# /media match and is also assumes that a file, with the
# same name with a list of directories to backup exists
# in /etc/s3ql
# Check for bucket name / directory on standard input
if [[ $1 ]]; then
  BUCKET=$1
elif [[ ! $1 ]]; then
  echo "Type the bucketname and then [ENTER]:"
  read bucket
  BUCKET=$bucket
fi
# Backup destination  (storage url)
storage_url="s3c://s.qstack.advania.com:443/$BUCKET"
# Check that a list of diectories to backup exists at
# /etc/s3ql/$BUCKET
if [[ ! -f "/etc/s3ql/$BUCKET" ]]; then
  echo "You need to create /etc/s3ql/$BUCKET with a list of directories to backup"
  exit
else
  BACKUP_LIST="/etc/s3ql/$BUCKET"
fi
# Recover cache if e.g. system was shut down while fs was mounted
fsck.s3ql --batch "$storage_url"
# Create a temporary mountpoint and mount file system
mountpoint="/tmp/s3ql_backup_$$"
mkdir "$mountpoint"
mount.s3ql "$storage_url" "$mountpoint"
# Make sure the file system is unmounted when we are done
# Note that this overwrites the earlier trap, so we
# also delete the lock file here.
trap "cd /; umount.s3ql '$mountpoint'; rmdir '$mountpoint'; rm '$lock'" EXIT
# Figure out the most recent backup
cd "$mountpoint"
last_backup=`python &amp;lt;&amp;lt;EOF
import os
import re
backups=sorted(x for x in os.listdir('.') if re.match(r'^[\\d-]{10}_[\\d:]{8}$', x))
if backups:
    print backups[-1]
EOF`
# Duplicate the most recent backup unless this is the first backup
new_backup=`date "+%Y-%m-%d_%H:%M:%S"`
if [ -n "$last_backup" ]; then
    echo "Copying $last_backup to $new_backup..."
    s3qlcp "$last_backup" "$new_backup"
    # Make the last backup immutable
    # (in case the previous backup was interrupted prematurely)
    s3qllock "$last_backup"
fi
# ..and update the copy
#rsync -aHAXx --delete-during --delete-excluded --partial -v \
#    --exclude /.cache/ \
#    --exclude /.s3ql/ \
#    --exclude /.thumbnails/ \
#    --exclude /tmp/ \
#    "/home/my_username/" "./$new_backup/"
if [[ -d $mountpoint ]]; then
  if [[ ! -d "$mountpoint/$new_backup" ]]; then
    echo "$mountpoint/$new_backup doesn't exist so creating it"
    mkdir $mountpoint/$new_backup
  fi
  for dir in $(&amp;lt;${BACKUP_LIST}); do
    mkdir "$mountpoint/$new_backup$dir/"
    rsync -aHAXx --delete-during --delete-excluded --partial -v "/media/$BUCKET$dir/" "$mountpoint/$new_backup$dir/"
  done
else
  echo "$mountpoint doesn't exist - something has gone horribly wrong"
  exit
fi
# Make the new backup immutable
s3qllock "$new_backup"
# Expire old backups
# Note that expire_backups.py comes from contrib/ and is not installed
# by default when you install from the source tarball. If you have
# installed an S3QL package for your distribution, this script *may*
# be installed, and it *may* also not have the .py ending.
expire_backups --use-s3qlrm 1 7 14 31 90 180 360
&lt;/pre&gt;&lt;p&gt;
And it was tested for &lt;a class="wiki" href="https://trac.crin.org/trac/wiki/Crin4"&gt;Crin4&lt;/a&gt; (unique strings have been replaced with XXX):
&lt;/p&gt;
&lt;pre class="wiki"&gt;s3ql_backup crin4
Starting fsck of s3c://s.qstack.advania.com:443/crin4/
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)...
Checking objects (sizes)...
Checking blocks (referenced objects)...
Checking blocks (refcounts)...
Checking blocks (checksums)...
Checking inode-block mapping (blocks)...
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 217 bytes of compressed metadata.
Cycling metadata backups...
Backing up old metadata...
Unexpected server reply: expected XML, got:
200 OK
x-amz-meta-006: 'object_id': 's3ql_metadata_bak_1',
x-amz-meta-007: 'encryption': 'AES_v2',
Content-Length: 0
x-amz-meta-005: 'signature': b'XXX=',
x-amz-meta-002: 'nonce': b'XXX=',
x-amz-meta-003: 'compression': 'None',
x-amz-meta-000: 'data': b'XXX
x-amz-meta-001: Hqdkxrg8Pk5zw==',
x-amz-id-2: XXX
x-amz-meta-md5: XXX
x-amz-meta-004: 'format_version': 2,
Last-Modified: Thu, 23 Jul 2015 11:09:01 GMT
ETag: "XXX"
x-amz-request-id: XXX
x-amz-meta-format: raw2
Content-Type: text/html; charset="UTF-8"
X-Trans-Id: XXX
Date: Thu, 23 Jul 2015 11:09:00 +0000
Connection: keep-alive
Uncaught top-level exception:
Traceback (most recent call last):
  File "/usr/bin/fsck.s3ql", line 9, in &amp;lt;module&amp;gt;
    load_entry_point('s3ql==2.13', 'console_scripts', 'fsck.s3ql')()
  File "/usr/lib/s3ql/s3ql/fsck.py", line 1307, in main
    cycle_metadata(backend)
  File "/usr/lib/s3ql/s3ql/metadata.py", line 121, in cycle_metadata
    cycle_fn("s3ql_metadata_bak_%d" % i, "s3ql_metadata_bak_%d" % (i + 1))
  File "/usr/lib/s3ql/s3ql/backends/comprenc.py", line 291, in copy
    self._copy_or_rename(src, dest, rename=False, metadata=metadata)
  File "/usr/lib/s3ql/s3ql/backends/comprenc.py", line 325, in _copy_or_rename
    self.backend.copy(src, dest, metadata=meta_raw)
  File "/usr/lib/s3ql/s3ql/backends/common.py", line 52, in wrapped
    return method(*a, **kw)
  File "/usr/lib/s3ql/s3ql/backends/s3c.py", line 404, in copy
    root = self._parse_xml_response(resp, body)
  File "/usr/lib/s3ql/s3ql/backends/s3c.py", line 554, in _parse_xml_response
    raise RuntimeError('Unexpected server response')
RuntimeError: Unexpected server response
&lt;/pre&gt;&lt;p&gt;
Try mounting the S3QL space:
&lt;/p&gt;
&lt;pre class="wiki"&gt;mount.s3ql --cachedir /var/s3ql --authfile /root/.s3ql/authinfo2 --allow-root s3c://s.qstack.advania.com:443/crin4 /media/s3ql/crin4
Using 2 upload threads (memory limited).
Autodetected 65498 file descriptors available for cache entries
Ignoring locally cached metadata (outdated).
Backend reports that fs is still mounted elsewhere, aborting.
&lt;/pre&gt;&lt;p&gt;
So, that is how to reproduce the problem... I was suggested &lt;a class="ext-link" href="https://bitbucket.org/nikratio/s3ql/issues/151/problem-with-advania-s3-storage-space"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;on the ticket I opened&lt;/a&gt; that &lt;a class="ext-link" href="https://bitbucket.org/nikratio/s3ql/issues/151/problem-with-advania-s3-storage-space#issues-comments-container"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;I email the s3ql list&lt;/a&gt;, so &lt;a class="ext-link" href="https://groups.google.com/forum/#!topic/s3ql/7Hd7vGsSczg"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;I have done that&lt;/a&gt; and I have also emailed Advania.
&lt;/p&gt;
      </description>
      <category>Ticket</category>
    </item><item>
      
        <dc:creator>chris</dc:creator>

      <pubDate>Thu, 23 Jul 2015 11:59:14 GMT</pubDate>
      <title>hours, totalhours changed</title>
      <link>https://trac.crin.org/trac/ticket/11#comment:31</link>
      <guid isPermaLink="false">https://trac.crin.org/trac/ticket/11#comment:31</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.2&lt;/em&gt;
            &lt;/li&gt;
            &lt;li&gt;&lt;strong&gt;totalhours&lt;/strong&gt;
                changed from &lt;em&gt;13.93&lt;/em&gt; to &lt;em&gt;14.13&lt;/em&gt;
            &lt;/li&gt;
          &lt;/ul&gt;
        &lt;p&gt;
Nikolaus, the S3QL developer, replied on &lt;a class="ext-link" href="https://groups.google.com/forum/#!topic/s3ql/7Hd7vGsSczg"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;the list&lt;/a&gt;:
&lt;/p&gt;
&lt;blockquote class="citation"&gt;
&lt;p&gt;
Look for" dumb-copy" in the S3QL documentation. But note that this does not speak well for your storage provider. I recommend raising this issue with them instead of working around it in S3QL.
&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;
The reference for this is &lt;a class="ext-link" href="http://www.rath.org/s3ql-docs/backends.html#cmdoption-s3c_backend-arg-dumb-copy"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;http://www.rath.org/s3ql-docs/backends.html#cmdoption-s3c_backend-arg-dumb-copy&lt;/a&gt; but I'm not sure how to use this option:
&lt;/p&gt;
&lt;pre class="wiki"&gt;mount.s3ql --cachedir /var/s3ql --authfile /root/.s3ql/authinfo2 --allow-root --dumb-copy s3c://s.qstack.advania.com:443/crin4 /media/s3ql/crin4
usage: mount.s3ql [-h] [--log &amp;lt;target&amp;gt;] [--cachedir &amp;lt;path&amp;gt;]
                  [--authfile &amp;lt;path&amp;gt;] [--debug-modules &amp;lt;modules&amp;gt;] [--debug]
                  [--quiet] [--backend-options &amp;lt;options&amp;gt;] [--version]
                  [--cachesize &amp;lt;size&amp;gt;] [--max-cache-entries &amp;lt;num&amp;gt;]
                  [--allow-other] [--allow-root] [--fg] [--upstart]
                  [--compress &amp;lt;algorithm-lvl&amp;gt;]
                  [--metadata-upload-interval &amp;lt;seconds&amp;gt;] [--threads &amp;lt;no&amp;gt;]
                  [--nfs]
                  &amp;lt;storage-url&amp;gt; &amp;lt;mountpoint&amp;gt;
mount.s3ql: error: unrecognized arguments: --dumb-copy
&lt;/pre&gt;&lt;p&gt;
So I have asked on the s3ql list.
&lt;/p&gt;
      </description>
      <category>Ticket</category>
    </item><item>
      
        <dc:creator>chris</dc:creator>

      <pubDate>Thu, 23 Jul 2015 14:36:10 GMT</pubDate>
      <title>hours, totalhours changed</title>
      <link>https://trac.crin.org/trac/ticket/11#comment:32</link>
      <guid isPermaLink="false">https://trac.crin.org/trac/ticket/11#comment:32</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;14.13&lt;/em&gt; to &lt;em&gt;16.13&lt;/em&gt;
            &lt;/li&gt;
          &lt;/ul&gt;
        &lt;p&gt;
So it's &lt;tt&gt;--backend-options=dumb-copy&lt;/tt&gt; not &lt;tt&gt;--dumb-copy&lt;/tt&gt;, trying again:
&lt;/p&gt;
&lt;pre class="wiki"&gt;mount.s3ql --cachedir /var/s3ql --authfile /root/.s3ql/authinfo2 --allow-root --backend-options=dumb-copy s3c://s.qstack.advania.com:443/crin4 /media/s3ql/crin4
  Using 2 upload threads (memory limited).
  Autodetected 65498 file descriptors available for cache entries
  Ignoring locally cached metadata (outdated).
  Backend reports that fs is still mounted elsewhere, aborting.
umount.s3ql /media/s3ql/crin4
  /media/s3ql/crin4 is not on an S3QL file system
fsck.s3ql --backend-options=dumb-copy s3c://s.qstack.advania.com:443/crin4
  Starting fsck of s3c://s.qstack.advania.com:443/crin4/
  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)...
  Checking objects (sizes)...
  Checking blocks (referenced objects)...
  Checking blocks (refcounts)...
  Checking blocks (checksums)...
  Checking inode-block mapping (blocks)...
  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 217 bytes of compressed metadata.
  Cycling metadata backups...
  Backing up old metadata...
  Completed fsck of s3c://s.qstack.advania.com:443/crin4/
&lt;/pre&gt;&lt;p&gt;
So that seems to work... the backup script, &lt;tt&gt;/usr/local/bin/s3ql_backup&lt;/tt&gt; was updated:
&lt;/p&gt;
&lt;pre class="wiki"&gt;#!/bin/bash
# Abort entire script if any command fails
set -e
# This script assumes that bucketname and directory under
# /media match and is also assumes that a file, with the
# same name with a list of directories to backup exists
# in /etc/s3ql
# Check for bucket name / directory on standard input
if [[ $1 ]]; then
  BUCKET=$1
elif [[ ! $1 ]]; then
  echo "Type the bucketname and then [ENTER]:"
  read bucket
  BUCKET=$bucket
fi
# Backup destination  (storage url)
storage_url="s3c://s.qstack.advania.com:443/$BUCKET"
# Check that a list of diectories to backup exists at
# /etc/s3ql/$BUCKET
if [[ ! -f "/etc/s3ql/$BUCKET" ]]; then
  echo "You need to create /etc/s3ql/$BUCKET with a list of directories to backup"
  exit
else
  BACKUP_LIST="/etc/s3ql/$BUCKET"
fi
# Recover cache if e.g. system was shut down while fs was mounted
fsck.s3ql --backend-options="dumb-copy" --batch "$storage_url"
# Create a temporary mountpoint and mount file system
mountpoint="/tmp/s3ql_backup_$$"
mkdir "$mountpoint"
mount.s3ql --backend-options="dumb-copy" "$storage_url" "$mountpoint"
# Make sure the file system is unmounted when we are done
# Note that this overwrites the earlier trap, so we
# also delete the lock file here.
trap "cd /; umount.s3ql '$mountpoint'; rmdir '$mountpoint'; rm '$lock'" EXIT
# Figure out the most recent backup
cd "$mountpoint"
last_backup=`python &amp;lt;&amp;lt;EOF
import os
import re
backups=sorted(x for x in os.listdir('.') if re.match(r'^[\\d-]{10}_[\\d:]{8}$', x))
if backups:
    print backups[-1]
EOF`
# Duplicate the most recent backup unless this is the first backup
new_backup=`date "+%Y-%m-%d_%H:%M:%S"`
if [ -n "$last_backup" ]; then
    echo "Copying $last_backup to $new_backup..."
    s3qlcp "$last_backup" "$new_backup"
    # Make the last backup immutable
    # (in case the previous backup was interrupted prematurely)
    s3qllock "$last_backup"
fi
# ..and update the copy
#rsync -aHAXx --delete-during --delete-excluded --partial -v \
#    --exclude /.cache/ \
#    --exclude /.s3ql/ \
#    --exclude /.thumbnails/ \
#    --exclude /tmp/ \
#    "/home/my_username/" "./$new_backup/"
if [[ -d $mountpoint ]]; then
  if [[ ! -d "$mountpoint/$new_backup" ]]; then
    echo "$mountpoint/$new_backup doesn't exist so creating it"
    mkdir -p $mountpoint/$new_backup
  fi
  for dir in $(&amp;lt;${BACKUP_LIST}); do
    mkdir -p "$mountpoint/$new_backup$dir/"
    rsync -aHAXx --delete-during --delete-excluded --partial -v "/media/$BUCKET$dir/" "$mountpoint/$new_backup$dir/"
  done
else
  echo "$mountpoint doesn't exist - something has gone horribly wrong"
  exit
fi
# Make the new backup immutable
s3qllock "$new_backup"
# Expire old backups
# Note that expire_backups.py comes from contrib/ and is not installed
# by default when you install from the source tarball. If you have
# installed an S3QL package for your distribution, this script *may*
# be installed, and it *may* also not have the .py ending.
expire_backups --use-s3qlrm 1 7 14 31 90 180 360
&lt;/pre&gt;&lt;p&gt;
Create a script to mount and un-mount the servers via SSHFS, &lt;a class="wiki" href="https://trac.crin.org/trac/wiki/SshfsMnt"&gt;wiki:SshfsMnt&lt;/a&gt;, create a wiki page for the backup script, &lt;a class="wiki" href="https://trac.crin.org/trac/wiki/S3QLBackup"&gt;wiki:S3QLBackup&lt;/a&gt; and one for a mount and unmount script, &lt;a class="wiki" href="https://trac.crin.org/trac/wiki/S3QLMnt"&gt;S3QLMnt&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
Testing the backup script for &lt;a class="wiki" href="https://trac.crin.org/trac/wiki/Crin1"&gt;Crin1&lt;/a&gt; ended with this message:
&lt;/p&gt;
&lt;pre class="wiki"&gt;sent 556,338,946 bytes  received 816,520 bytes  472,766.62 bytes/sec
total size is 553,284,301  speedup is 0.99
Found more than one backup but no state file! Aborting.
&lt;/pre&gt;&lt;p&gt;
I'm not sure what this means, it appears to still be running, it is an error message from &lt;tt&gt;/usr/bin/expire_backups&lt;/tt&gt;.
&lt;/p&gt;
&lt;p&gt;
The backup tasks were added to the &lt;a class="wiki" href="https://trac.crin.org/trac/wiki/Crin3"&gt;Crin3&lt;/a&gt; root crontab:
&lt;/p&gt;
&lt;pre class="wiki"&gt;01 01 * * * umnt-s3ql crin1 ; mnt-sshfs crin1 ; s3ql_backup crin1
01 02 * * * umnt-s3ql crin2 ; mnt-sshfs crin2 ; s3ql_backup crin2
01 03 * * * umnt-s3ql crin4 ; mnt-sshfs crin4 ; s3ql_backup crin4
&lt;/pre&gt;&lt;p&gt;
Exim was configured 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;dpkg-reconfigure exim4-config
&lt;/pre&gt;&lt;p&gt;
And Also Fail2ban and Iptables were setup.
&lt;/p&gt;
&lt;p&gt;
I have left the backup jobs running in screen, I'll check back on them later to see if they are working OK.
&lt;/p&gt;
      </description>
      <category>Ticket</category>
    </item><item>
      
        <dc:creator>chris</dc:creator>

      <pubDate>Fri, 24 Jul 2015 11:35:45 GMT</pubDate>
      <title>hours, totalhours changed</title>
      <link>https://trac.crin.org/trac/ticket/11#comment:33</link>
      <guid isPermaLink="false">https://trac.crin.org/trac/ticket/11#comment:33</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.71&lt;/em&gt;
            &lt;/li&gt;
            &lt;li&gt;&lt;strong&gt;totalhours&lt;/strong&gt;
                changed from &lt;em&gt;16.13&lt;/em&gt; to &lt;em&gt;16.84&lt;/em&gt;
            &lt;/li&gt;
          &lt;/ul&gt;
        &lt;p&gt;
The backup jobs seem to be running OK so far (but I did have to reboot the server last night after s3ql appeared to have stopped responding, as a result there are lots of inodes being committed to the backend during the s3ql filesystem check), I have done some work on the documentation, at &lt;a class="wiki" href="https://trac.crin.org/trac/wiki/Crin3"&gt;Crin3&lt;/a&gt; and have enabled a nightly cronjob to run the backups. We also now have &lt;a class="ext-link" href="https://munin.crin.org/munin/crin.org/crin3.crin.org/index.html"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;Munin stats&lt;/a&gt; for the server.
&lt;/p&gt;
      </description>
      <category>Ticket</category>
    </item><item>
      
        <dc:creator>chris</dc:creator>

      <pubDate>Fri, 24 Jul 2015 11:44:25 GMT</pubDate>
      <title>hours, totalhours changed</title>
      <link>https://trac.crin.org/trac/ticket/11#comment:34</link>
      <guid isPermaLink="false">https://trac.crin.org/trac/ticket/11#comment:34</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.03&lt;/em&gt;
            &lt;/li&gt;
            &lt;li&gt;&lt;strong&gt;totalhours&lt;/strong&gt;
                changed from &lt;em&gt;16.84&lt;/em&gt; to &lt;em&gt;16.87&lt;/em&gt;
            &lt;/li&gt;
          &lt;/ul&gt;
        &lt;p&gt;
One issue that still need solving is the error from the &lt;a class="ext-link" href="http://www.rath.org/s3ql-docs/contrib.html#expire-backups-py"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;expire_backups&lt;/a&gt; script:
&lt;/p&gt;
&lt;pre class="wiki"&gt;Found more than one backup but no state file! Aborting.
&lt;/pre&gt;
      </description>
      <category>Ticket</category>
    </item><item>
      
        <dc:creator>chris</dc:creator>

      <pubDate>Fri, 24 Jul 2015 16:53:41 GMT</pubDate>
      <title>hours, totalhours changed</title>
      <link>https://trac.crin.org/trac/ticket/11#comment:35</link>
      <guid isPermaLink="false">https://trac.crin.org/trac/ticket/11#comment:35</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.16&lt;/em&gt;
            &lt;/li&gt;
            &lt;li&gt;&lt;strong&gt;totalhours&lt;/strong&gt;
                changed from &lt;em&gt;16.87&lt;/em&gt; to &lt;em&gt;17.03&lt;/em&gt;
            &lt;/li&gt;
          &lt;/ul&gt;
        &lt;p&gt;
There is a problem with the Crin2 S3QL bucket:
&lt;/p&gt;
&lt;pre class="wiki"&gt;fsck.s3ql --backend-options="dumb-copy" s3c://s.qstack.advania.com:443/crin2
Starting fsck of s3c://s.qstack.advania.com:443/crin2/
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 19000 objects so far..object 6236 only exists in table but not in backend, deleting
File may lack data, moved to /lost+found: b'/lost+found/lost+found_lost+found__2015-07-23________14:31:29____var____www____prod____docroot____owncloud________old____3rdparty____symfony____routing____Symfony____Component____Routing____Router.php'
Dropping temporary indices...
Uncaught top-level exception:
Traceback (most recent call last):
  File "/usr/bin/fsck.s3ql", line 9, in &amp;lt;module&amp;gt;
    load_entry_point('s3ql==2.13', 'console_scripts', 'fsck.s3ql')()
  File "/usr/lib/s3ql/s3ql/fsck.py", line 1272, in main
    fsck.check()
  File "/usr/lib/s3ql/s3ql/fsck.py", line 90, in check
    self.check_objects_id()
  File "/usr/lib/s3ql/s3ql/fsck.py", line 951, in check_objects_id
    (_, newname) = self.resolve_free(b"/lost+found", escape(path))
  File "/usr/lib/s3ql/s3ql/fsck.py", line 1004, in resolve_free
    name += b'-'
TypeError: Can't convert 'bytes' object to str implicitly
&lt;/pre&gt;&lt;p&gt;
I have looked at the &lt;a class="ext-link" href="https://qstack.advania.com/storage"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;Advania&lt;/a&gt; interface and there isn't a way to delete all the files and start again as you just get a spinning progress bar when you try to get the list of times in the bucket. I&lt;em&gt;ll email Advania] about this.
&lt;/em&gt;&lt;/p&gt;
      </description>
      <category>Ticket</category>
    </item><item>
      
        <dc:creator>chris</dc:creator>

      <pubDate>Fri, 24 Jul 2015 17:25:35 GMT</pubDate>
      <title>hours, totalhours changed</title>
      <link>https://trac.crin.org/trac/ticket/11#comment:36</link>
      <guid isPermaLink="false">https://trac.crin.org/trac/ticket/11#comment:36</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.26&lt;/em&gt;
            &lt;/li&gt;
            &lt;li&gt;&lt;strong&gt;totalhours&lt;/strong&gt;
                changed from &lt;em&gt;17.03&lt;/em&gt; to &lt;em&gt;17.29&lt;/em&gt;
            &lt;/li&gt;
          &lt;/ul&gt;
        &lt;p&gt;
Someone else had &lt;a class="ext-link" href="https://bitbucket.org/nikratio/s3ql/issues/137/s3qlfsck-fails-with-typeerror-cant-convert"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;this error in March 2014&lt;/a&gt;, I tried applying &lt;a class="ext-link" href="https://bitbucket.org/nikratio/s3ql/commits/809d457684c8"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;the patch&lt;/a&gt; and then got this error:
&lt;/p&gt;
&lt;pre class="wiki"&gt;fsck.s3ql --backend-options="dumb-copy" s3c://s.qstack.advania.com:443/crin2
Starting fsck of s3c://s.qstack.advania.com:443/crin2/
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 18000 objects so far..object 6236 only exists in table but not in backend, deleting
File may lack data, moved to /lost+found: b'/lost+found/lost+found_lost+found__2015-07-23________14:31:29____var____www____prod____docroot____owncloud________old____3rdparty____symfony____routing____Symfony____Component____Routing____Router.php'
Dropping temporary indices...
Uncaught top-level exception:
Traceback (most recent call last):
  File "/usr/bin/fsck.s3ql", line 9, in &amp;lt;module&amp;gt;
    load_entry_point('s3ql==2.13', 'console_scripts', 'fsck.s3ql')()
  File "/usr/lib/s3ql/s3ql/fsck.py", line 1274, in main
    fsck.check()
  File "/usr/lib/s3ql/s3ql/fsck.py", line 90, in check
    self.check_objects_id()
  File "/usr/lib/s3ql/s3ql/fsck.py", line 951, in check_objects_id
    (_, newname) = self.resolve_free(b"/lost+found", escape(path))
  File "/usr/lib/s3ql/s3ql/fsck.py", line 1002, in resolve_free
    name = b'%s ... %s' % (name[0:120], name[-120:])
TypeError: unsupported operand type(s) for %: 'bytes' and 'tuple'
&lt;/pre&gt;&lt;p&gt;
I have raised this on &lt;a class="ext-link" href="https://groups.google.com/forum/#!topic/s3ql/7Hd7vGsSczg"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;the thread I created on the S3QL list&lt;/a&gt;.
&lt;/p&gt;
      </description>
      <category>Ticket</category>
    </item><item>
      
        <dc:creator>chris</dc:creator>

      <pubDate>Fri, 24 Jul 2015 20:05:22 GMT</pubDate>
      <title>hours, totalhours changed</title>
      <link>https://trac.crin.org/trac/ticket/11#comment:37</link>
      <guid isPermaLink="false">https://trac.crin.org/trac/ticket/11#comment:37</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.43&lt;/em&gt;
            &lt;/li&gt;
            &lt;li&gt;&lt;strong&gt;totalhours&lt;/strong&gt;
                changed from &lt;em&gt;17.29&lt;/em&gt; to &lt;em&gt;17.72&lt;/em&gt;
            &lt;/li&gt;
          &lt;/ul&gt;
        &lt;p&gt;
The Advania web interface is very slow, I expect, due to the number of files created in each bucket and doing something like deleting all the files in a bucket would take forever as each delete takes two clicks, so installing &lt;a class="ext-link" href="http://s3tools.org/s3cmd"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;s3cmd&lt;/a&gt;:
&lt;/p&gt;
&lt;pre class="wiki"&gt;aptitude install s3cmd
&lt;/pre&gt;&lt;p&gt;
Create a &lt;tt&gt;/root/.s3cfg&lt;/tt&gt; file like this:
&lt;/p&gt;
&lt;pre class="wiki"&gt;[default]
access_key = XXX
host_base = s.qstack.advania.com:443
host_bucket = %(bucket)s.s.qstack.advania.com:443
secret_key = XXX
use_https = True
signature_v2 = True
&lt;/pre&gt;&lt;p&gt;
Then this can be used to list buckets etc, eg:
&lt;/p&gt;
&lt;pre class="wiki"&gt; s3cmd ls
2009-02-03 16:45  s3://crin-1984-crin1
2009-02-03 16:45  s3://crin-1984-crin2
2009-02-03 16:45  s3://crin-gq-db1
2009-02-03 16:45  s3://crin-gq-web1
2009-02-03 16:45  s3://crin-gq-web2
2009-02-03 16:45  s3://crin-gq-wiki
2009-02-03 16:45  s3://crin-greenqloud-db1
2009-02-03 16:45  s3://crin1
2009-02-03 16:45  s3://crin2
2009-02-03 16:45  s3://crin4
2009-02-03 16:45  s3://crinbackup-default
&lt;/pre&gt;&lt;p&gt;
So deleting the buckets we don't need:
&lt;/p&gt;
&lt;pre class="wiki"&gt;s3cmd del s3://crin-gq-wiki/*
File s3://crin-gq-wiki/s3ql_data_10 deleted
File s3://crin-gq-wiki/s3ql_data_100 deleted
File s3://crin-gq-wiki/s3ql_data_1000 deleted
...
s3cmd rb s3://crin-gq-wiki
&lt;/pre&gt;&lt;p&gt;
Note in one bucket there was a hidden &lt;tt&gt;~/.trash&lt;/tt&gt; directory which needed all the files manually deleting via the web interface, I have set off lots of sessions in screen to delete the corrupted data and buckets we don't need (everything apart from &lt;tt&gt;crin1&lt;/tt&gt; and &lt;tt&gt;crin4&lt;/tt&gt;) as these commands take a long time to run...
&lt;/p&gt;
      </description>
      <category>Ticket</category>
    </item><item>
      
        <dc:creator>chris</dc:creator>

      <pubDate>Fri, 24 Jul 2015 22:44:13 GMT</pubDate>
      <title>hours, totalhours changed</title>
      <link>https://trac.crin.org/trac/ticket/11#comment:38</link>
      <guid isPermaLink="false">https://trac.crin.org/trac/ticket/11#comment:38</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.15&lt;/em&gt;
            &lt;/li&gt;
            &lt;li&gt;&lt;strong&gt;totalhours&lt;/strong&gt;
                changed from &lt;em&gt;17.72&lt;/em&gt; to &lt;em&gt;17.87&lt;/em&gt;
            &lt;/li&gt;
          &lt;/ul&gt;
        &lt;p&gt;
Looking at the volume of files deleted in around 20 mins:
&lt;/p&gt;
&lt;pre class="wiki"&gt;date ; s3cmd du -H
Fri Jul 24 21:49:57 GMT 2015
12G      s3://crin-gq-web1/
62M      s3://crin-gq-web2/
1444M    s3://crin1/
492M     s3://crin2/
322M     s3://crin4/
0        s3://crinbackup-default/
--------
14G      Total
date ; s3cmd du -H
Fri Jul 24 22:11:50 GMT 2015
12G      s3://crin-gq-web1/
59M      s3://crin-gq-web2/
1444M    s3://crin1/
484M     s3://crin2/
322M     s3://crin4/
0        s3://crinbackup-default/
--------
14G      Total
&lt;/pre&gt;&lt;p&gt;
It'll take around 20 hours to delete the files in crin2 (8M in 20 mins so 24M an hour and 484/24 is 20) and days to delete crin-gq-web1.
&lt;/p&gt;
      </description>
      <category>Ticket</category>
    </item><item>
      
        <dc:creator>jenny</dc:creator>

      <pubDate>Sat, 25 Jul 2015 08:15:03 GMT</pubDate>
      <title></title>
      <link>https://trac.crin.org/trac/ticket/11#comment:39</link>
      <guid isPermaLink="false">https://trac.crin.org/trac/ticket/11#comment:39</guid>
      <description>
        &lt;pre class="wiki"&gt;Hi Chris,
Please can you confirm that the deletions would be automated rather than you spending 20 hours on these. This would be way outside our budget. I see that the ticket for this has already crept up to 18 hours. Are the deletions the final step?
Thanks,
Jenny
Sent from my iPhone
&amp;gt; On 24 Jul 2015, at 23:44, CRIN Trac &amp;lt;trac@trac.crin.org&amp;gt; wrote:
&amp;gt;
&amp;gt; #11: Set up backups
&amp;gt; -------------------------------------+-------------------------------------
&amp;gt;                 Reporter:  chris    |                Owner:  chris
&amp;gt;                     Type:  defect   |               Status:  reopened
&amp;gt;                 Priority:  major    |            Milestone:  Install and
&amp;gt;                                     |  configure crin1
&amp;gt;                Component:  backups  |              Version:
&amp;gt;               Resolution:           |             Keywords:
&amp;gt; Estimated Number of Hours:  6        |  Add Hours to Ticket:  0.15
&amp;gt;                Billable?:  1        |          Total Hours:  17.72
&amp;gt; -------------------------------------+-------------------------------------
&amp;gt; Changes (by chris):
&amp;gt;
&amp;gt; * hours:  0 =&amp;gt; 0.15
&amp;gt; * totalhours:  17.72 =&amp;gt; 17.87
&amp;gt;
&amp;gt;
&amp;gt; Comment:
&amp;gt;
&amp;gt; Looking at the volume of files deleted in around 20 mins:
&amp;gt;
&amp;gt; {{{
&amp;gt; date ; s3cmd du -H
&amp;gt; Fri Jul 24 21:49:57 GMT 2015
&amp;gt; 12G      s3://crin-gq-web1/
&amp;gt; 62M      s3://crin-gq-web2/
&amp;gt; 1444M    s3://crin1/
&amp;gt; 492M     s3://crin2/
&amp;gt; 322M     s3://crin4/
&amp;gt; 0        s3://crinbackup-default/
&amp;gt; --------
&amp;gt; 14G      Total
&amp;gt;
&amp;gt; date ; s3cmd du -H
&amp;gt; Fri Jul 24 22:11:50 GMT 2015
&amp;gt; 12G      s3://crin-gq-web1/
&amp;gt; 59M      s3://crin-gq-web2/
&amp;gt; 1444M    s3://crin1/
&amp;gt; 484M     s3://crin2/
&amp;gt; 322M     s3://crin4/
&amp;gt; 0        s3://crinbackup-default/
&amp;gt; --------
&amp;gt; 14G      Total
&amp;gt; }}}
&amp;gt;
&amp;gt; It'll take around 20 hours to delete the files in crin2 (8M in 20 mins so
&amp;gt; 24M an hour and 484/24 is 20) and days to delete crin-gq-web1.
&amp;gt;
&amp;gt; --
&amp;gt; Ticket URL: &amp;lt;https://trac.crin.org/trac/ticket/11#comment:38&amp;gt;
&amp;gt; CRIN Trac &amp;lt;https://trac.crin.org/trac&amp;gt;
&amp;gt; Trac project for CRIN website and servers.
&lt;/pre&gt;
      </description>
      <category>Ticket</category>
    </item><item>
      
        <dc:creator>chris</dc:creator>

      <pubDate>Sat, 25 Jul 2015 10:47:35 GMT</pubDate>
      <title>hours, totalhours changed</title>
      <link>https://trac.crin.org/trac/ticket/11#comment:40</link>
      <guid isPermaLink="false">https://trac.crin.org/trac/ticket/11#comment:40</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.45&lt;/em&gt;
            &lt;/li&gt;
            &lt;li&gt;&lt;strong&gt;totalhours&lt;/strong&gt;
                changed from &lt;em&gt;17.87&lt;/em&gt; to &lt;em&gt;18.32&lt;/em&gt;
            &lt;/li&gt;
          &lt;/ul&gt;
        &lt;p&gt;
Replying to &lt;a class="ticket" href="https://trac.crin.org/trac/ticket/11#comment:39" title="Comment 39"&gt;jenny&lt;/a&gt;:
&lt;/p&gt;
&lt;blockquote class="citation"&gt;
&lt;p&gt;
Please can you confirm that the deletions would be automated rather than you spending 20 hours on these.
&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;
Yes of course, it would be too boring to watch it happening!
&lt;/p&gt;
&lt;blockquote class="citation"&gt;
&lt;p&gt;
I see that the ticket for this has already crept up to 18 hours. Are the deletions the final step?
&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;
This ticket stood at 10h 58m when I started work on it again, &lt;a class="closed ticket" href="https://trac.crin.org/trac/ticket/11#comment:29" title="defect: Set up backups (closed: fixed)"&gt;ticket:11#comment:29&lt;/a&gt; so we are still under the 8 hour budget.
&lt;/p&gt;
&lt;p&gt;
All the files were removed overnight so the unneeded buckets were deleted, the crin2 bucket was reformatted:
&lt;/p&gt;
&lt;pre class="wiki"&gt;mkfs.s3ql --authfile /root/.s3ql/authinfo2 s3c://s.qstack.advania.com:443/crin2
&lt;/pre&gt;&lt;p&gt;
And I have manually set off the backup of crin2.
&lt;/p&gt;
&lt;p&gt;
The backups of crin1 and crin4 should have happened last night but didn't as &lt;tt&gt;/usr/local/bin&lt;/tt&gt; isn't in the default path, the email:
&lt;/p&gt;
&lt;pre class="wiki"&gt;Date: Sat, 25 Jul 2015 03:01:01 +0000
From: Cron Daemon &amp;lt;root@crin3.crin.org&amp;gt;
To: root@crin3.crin.org
Subject: Cron &amp;lt;root@crin3&amp;gt; umnt-s3ql crin4 ; mnt-sshfs crin4 ; s3ql_backup crin4
/bin/sh: 1: umnt-s3ql: not found
/bin/sh: 1: mnt-sshfs: not found
/bin/sh: 1: s3ql_backup: not found
&lt;/pre&gt;&lt;p&gt;
So the crontab has been updated:
&lt;/p&gt;
&lt;pre class="wiki"&gt;# m h  dom mon dow   command
01 01 * * * /usr/local/bin/umnt-s3ql crin1 ; /usr/local/bin/mnt-sshfs crin1 ; /usr/local/bin/s3ql_backup crin1
#01 02 * * * /usr/local/bin/umnt-s3ql crin2 ; /usr/local/bin/mnt-sshfs crin2 ; /usr/local/bin/s3ql_backup crin2
01 03 * * * /usr/local/bin/umnt-s3ql crin4 ; /usr/local/bin/mnt-sshfs crin4 ; /usr/local/bin/s3ql_backup crin4
&lt;/pre&gt;&lt;p&gt;
This ticket is almost ready to be closed.
&lt;/p&gt;
      </description>
      <category>Ticket</category>
    </item><item>
      
        <dc:creator>chris</dc:creator>

      <pubDate>Mon, 27 Jul 2015 11:59:59 GMT</pubDate>
      <title>hours, status, totalhours changed; resolution set</title>
      <link>https://trac.crin.org/trac/ticket/11#comment:41</link>
      <guid isPermaLink="false">https://trac.crin.org/trac/ticket/11#comment:41</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.15&lt;/em&gt;
            &lt;/li&gt;
            &lt;li&gt;&lt;strong&gt;status&lt;/strong&gt;
                changed from &lt;em&gt;reopened&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;18.32&lt;/em&gt; to &lt;em&gt;18.47&lt;/em&gt;
            &lt;/li&gt;
          &lt;/ul&gt;
        &lt;p&gt;
The backups all ran fine last night, deleting old backups can be left to a later date as we will want to keep at least 30 days worth.
&lt;/p&gt;
&lt;p&gt;
The backup space being used:
&lt;/p&gt;
&lt;pre class="wiki"&gt;s3cmd du -H
1981M    s3://crin1/
17G      s3://crin2/
625M     s3://crin4/
&lt;/pre&gt;&lt;p&gt;
Closing this ticket, other tickets can be opened as needs be in the future for things like removing old backups.
&lt;/p&gt;
      </description>
      <category>Ticket</category>
    </item>
 </channel>
</rss>