"bin/storage dump" throws an exception


Observed Behavior:
“bin/storage dump” throws an exception after updating to the latest stable on Oct 7th

My nightly backup failed after upgrading. From the changelog, it appears like the dump procedure was modified.
I get the following exception when running bin/storage dump:
switching to the master branch does not resolve the problem.

root@vps:/var/www/phabricator/phabricator# bin/storage dump
[2017-10-07 01:26:17] EXCEPTION: (RuntimeException) Undefined variable: command at [<phutil>/src/error/PhutilErrorHandler.php:210]
arcanist(head=stable, ref.master=8762e3f36715, ref.stable=282b83bcbed4), phabricator(head=stable, ref.master=85011a46d0aa, ref.stable=58598e1963b6, custom=1), phutil(head=stable, ref.master=230c3e161c9a, ref.stable=b395c100c20b), sprint(head=master, ref.master=7a7368cd2162)
  #0 PhutilErrorHandler::handleError(integer, string, string, integer, array) called at [<phabricator>/src/infrastructure/storage/management/workflow/PhabricatorStorageManagementDumpWorkflow.php:218]
  #1 PhabricatorStorageManagementDumpWorkflow::didExecute(PhutilArgumentParser) called at [<phabricator>/src/infrastructure/storage/management/workflow/PhabricatorStorageManagementWorkflow.php:107]
  #2 PhabricatorStorageManagementWorkflow::execute(PhutilArgumentParser) called at [<phutil>/src/parser/argument/PhutilArgumentParser.php:441]
  #3 PhutilArgumentParser::parseWorkflowsFull(array) called at [<phutil>/src/parser/argument/PhutilArgumentParser.php:333]
  #4 PhutilArgumentParser::parseWorkflows(array) called at [<phabricator>/scripts/sql/manage_storage.php:249]

Expected Behavior:
Properly dump the database content

Phabricator Version:

phabricator 58598e1963b60bc34b7e0137d3f9b03d3e707ba8 (Fri, Oct 6) (branched from 85011a46d0aa1a5da241cb91620d929adc6414a9 on origin)

arcanist 282b83bcbed4325c00de84a052991923a39d18de (Fri, Oct 6) (branched from 76b54ce0a9af112bac2fb0498d9d44532b46f2d5 on origin)

phutil b395c100c20b7ea1f1f7cb9be809239f8cd0bcda (Fri, Oct 6) (branched from 9f9c33797a3ebbf1c4dcaa474a0c4e0b32d5396a on origin)

Reproduction Steps:
I have not created a new install to see if it happens on a clean install as that is a large effort and requires a clean server/vm.


Some additional detail:

I am running Ubuntu 14.04.5 LTS
PHP is 5.5.9
MySQL is 14.14 Distrib 5.5.57


Thanks; filed as https://secure.phabricator.com/T13004.

I don’t have the setup to fix this right now, but the workaround is to just comment out line 218 <phabricator>/src/infrastructure/storage/management/workflow/PhabricatorStorageManagementDumpWorkflow.php. You don’t need to restart the server or daemons after this, just remember to undo before next update.


@BornaE not related directly to this issue but would you share how you do a nightly backup? would you also share how/if you ever restore from that backup… and what do you get from that backup (is it backing up all the diffusion repos (git rep) or just the commit information, manfiest tasks, and revisions)

I don’t currently perform any application level backups (only backing the VM), and I’m interested to know if/how other people do regular backup/restore operations and how. (especially as I tend to upgrade weekly)


My phabricator is hosted on a VPS and I have a local NAS.

I have a cron job that runs nightly on the NAS, it connects to the VPS using ssh and dumps the database and zips the files directory, repos, and the configuration and then downloads them all using SCP.
I am planning on writing a pruning script at some point to clean up old backups, aka, keep all monthly backups, 8 weekly backups and ~10 nightly backups but have not gotten there yet.

Fortunately, I have not had to restore a backup yet. However, the steps appear to be well documented here: https://secure.phabricator.com/book/phabricator/article/configuring_backups/

Note that I don’t have any uptime requirements, i’d expect to be able to get everything up and running from scratch in less than a day if the server goes belly up.

I also have my git repos mirrored on bitbucket so no chance of losing code.