Restore from Backup issues

I’m having issues restoring from a backup. This is what I’m getting -

(kegbot-server.venv)[email protected]:~$ kegbot restore /
2014-11-06 00:32:03,347 INFO (pykeg.core.backup) Restoring from / …
2014-11-06 00:32:03,448 INFO (pykeg.core.backup) Restoring from /tmp/tmpWl5bi2/liquid-economy-20141105-221153 …

After this there is no information on the website. I have tried with 3 separate backup files.

Any help would be greatly appreciated.

“Killed” probably means the system ran out of memory.

Is this a digital ocean VM by chance? You can try adding a swapfile, or temporarily using a larger instance.

(I am on the road right now, so I don’t have links - but both techniques should be googleable)

Actually there’s probably an easier option

Unzip the file in your home dir on the machine. Then run the restore against the directory name rather than the zip file name.

It is a Digital Ocean VM. I have tried to unzip the file and restore again, getting an IOError: [Errno 21] Is a directory

I will try the other 2 options now.

Thanks for the super quick response!

I’m using Putty on windows 7, when trying to add a swapfile it asks for a password? I have no idea what it would be and according to google ubuntu doesn’t have a default password?

I’m an absolute beginner when it comes to Linux…


Mikey…Need some assistance.

I’ve successfully backup up a Kegberry install, exported the zip file and stored it on a thumb drive while I re-imaged my raspberry pi’s sdcard and reinstalled a fresh version of Kegberry. The time has come to restore my backup zip file and when I run the kegbot restore command, I get a “AssertionError: Unsafe to extract ZIPs in this Python version”

I’ve tried it with the zip file and unzipping the file and restoring it against the directory as you suggested in this thread. I’m using the most recent Kegberry build. I can provide a log file I’m sure, but I’ll have to google around a bit to figure out how to export it.

I was thinking I could just restore the files manually to their proper directories, but when I started searching for where the json files go, I came up empty handed with a terminal search (find "/home/kegberry/ -name ‘core_user.json’) etc.

Any help would be great. I’m at a complete and total loss of where to go from here.

Still no luck with the restore, any more ideas i could possibly try?

Thanks again for your help.

kegbot-server v1.1.1 has just been released and with it you should be able to restore directly from a directory. (Sorry, this wasn’t in v1.1.0). Perhaps try that?

Awesome, thanks Mikey.

I’m assuming you guys are going to update this page, its currently 404 -

My bad… found destructions here - HowTo: Install Kegbot Server on Digital Ocean

1 Like

Does restore against the directory now work for you? (@ezdankie same question)

Oh, well, we moved that to the forum. Are there dead link still pointing to it… somewhere?

It unfortunately doesn’t work, still getting ‘Killed’.

if it helps the backup file is 6.1mb

PeteQ: Maybe the simples bet is to temporarily use a bigger droplet size. See this guide from Digital Ocean on resizing your droplets.

    (kegbot-server.venv)[email protected] //home $ kegbot restore /home/backup
Traceback (most recent call last):
  File "/home/kegberry/kegbot-server.venv/bin/kegbot", line 39, in <module>
  File "/home/kegberry/kegbot-server.venv/local/lib/python2.7/site-packages/django/core/management/", line 399, in execute_from_command_line
  File "/home/kegberry/kegbot-server.venv/local/lib/python2.7/site-packages/django/core/management/", line 392, in execute
  File "/home/kegberry/kegbot-server.venv/local/lib/python2.7/site-packages/django/core/management/", line 242, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "/home/kegberry/kegbot-server.venv/local/lib/python2.7/site-packages/django/core/management/", line 285, in execute
    output = self.handle(*args, **options)
  File "/home/kegberry/kegbot-server.venv/local/lib/python2.7/site-packages/pykeg/core/management/commands/", line 39, in handle
  File "/home/kegberry/kegbot-server.venv/local/lib/python2.7/site-packages/pykeg/core/", line 410, in restore
  File "/home/kegberry/kegbot-server.venv/local/lib/python2.7/site-packages/pykeg/core/", line 397, in restore_from_directory
    with transaction.atomic():
  File "/home/kegberry/kegbot-server.venv/local/lib/python2.7/site-packages/django/db/", line 237, in __enter__
    if not connection.get_autocommit():
  File "/home/kegberry/kegbot-server.venv/local/lib/python2.7/site-packages/django/db/backends/", line 331, in get_autocommit
  File "/home/kegberry/kegbot-server.venv/local/lib/python2.7/site-packages/django/db/backends/", line 127, in ensure_connection
  File "/home/kegberry/kegbot-server.venv/local/lib/python2.7/site-packages/django/db/", line 99, in __exit__
    six.reraise(dj_exc_type, dj_exc_value, traceback)
  File "/home/kegberry/kegbot-server.venv/local/lib/python2.7/site-packages/django/db/backends/", line 127, in ensure_connection
  File "/home/kegberry/kegbot-server.venv/local/lib/python2.7/site-packages/django/db/backends/", line 115, in connect
    self.connection = self.get_new_connection(conn_params)
  File "/home/kegberry/kegbot-server.venv/local/lib/python2.7/site-packages/django/db/backends/mysql/", line 435, in get_new_connection
    conn = Database.connect(**conn_params)
  File "/home/kegberry/kegbot-server.venv/local/lib/python2.7/site-packages/MySQLdb/", line 81, in Connect
    return Connection(*args, **kwargs)
  File "/home/kegberry/kegbot-server.venv/local/lib/python2.7/site-packages/MySQLdb/", line 193, in __init__
    super(Connection, self).__init__(*args, **kwargs2)
django.db.utils.OperationalError: (2002, "Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)")
(kegbot-server.venv)[email protected] //home $

I have no idea what’s going on. Is there a different method for restoring a kegberry build versus a digital ocean build as in @PeteQ situation?

All issues now solved!

Thanks very much once again Mike!