                     cb         : cb
             (cb) =>
                 dbg("update syncstring to indicate patches have been archived in a blob")
-                # TODO
-                cb()
-            (cb) =>
-                dbg("delete patches")
-                # TODO
-                cb()
+                @table('syncstring').get(opts.string_id).update(archived:blob_uuid).run(cb)
+            (cb) =>
+                dbg("actually delete patches")
+                patches_query.delete().run(cb)
         ], (err) => opts.cb?(err))
 
     unarchive_syncstring: (opts) =>

            cb        : undefined
        dbg = @dbg("archive_syncstring(string_id='#{opts.string_id}')")
        syncstring = patches = blob_uuid = undefined
        async.series([
            (cb) =>
                dbg("get info about syncstring and patches")
                async.parallel([
                    (cb) =>
                        dbg("get syncstring")
                        # TODO
                        cb()
                    (cb) =>
                        dbg("get patches")
                        # TODO
                        cb()
                ], cb)
            (cb) =>
                dbg("create blob from patches")
                blob = JSON.stringify(patches)

            cb                : undefined
        dbg = @dbg("syncstring_maintenance")
        dbg(opts)
        syncstrings = undefined
        async.series([
            (cb) =>
                dbg("determine inactive syncstring ids")
                cutoff = misc.days_ago(opts.age_days)
                @table('syncstrings').filter(@r.row('last_active').le(cutoff)).limit(opts.limit).run (err, x) =>
                    syncstrings = x
                    cb(err)
            (cb) =>
                dbg("archive patches for inactive syncstrings")
                f = (string_id, cb) =>
