1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2025-03-28 12:08:14 +01:00

Use --hex-blob flag in bin/storage dump

Summary: mysqldump output can end up having weird encoding issues when raw BLOBs are in the output, preventing the backup restoration from succeeding. This hex-encodes blobs in the dump from the backup workflow causing the output file to only contain ASCII and ensure imports are successful.

Test Plan: Had issues restoring a backup from the original `mysqldump` command issued by this workflow. Ran the same command with this flag added and I was able to restore the backup.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: epriestley

Differential Revision: https://secure.phabricator.com/D11704
This commit is contained in:
Eric 2015-02-06 12:44:46 -08:00 committed by epriestley
parent 472f316bbd
commit 28b23fd789

View file

@ -44,7 +44,7 @@ final class PhabricatorStorageManagementDumpWorkflow
: '';
return phutil_passthru(
'mysqldump --single-transaction --default-character-set=utf8 '.
'mysqldump --hex-blob --single-transaction --default-character-set=utf8 '.
'-u %s %C -h %s %C --databases %Ls',
$api->getUser(),
$flag_password,