1.12releasedDump DB

Dump your database into a single SQL-file

Clone URLhttps://github.com/nils-werner/dump_db.git

Add as a submodulegit submodule add https://github.com/nils-werner/dump_db.git extensions/dump_db --recursive

Compatibility

2.x.x2.1.x2.2.x2.3.x2.4.x2.5.x2.6.x2.7.02.7.12.7.22.7.32.7.42.7.52.7.62.7.72.7.82.7.92.7.10
NoNo1.091.101.12NoNoNoNoNoNoNoNoNoNoNoNoNo. Soon?

Readme

Dump DB

This extension exports your Symphony database

Synopsis

This extension will create a downloadable copy of your Symphony CMS database. Please note that it will dump the complete database, not caring about sensitive data whatsoever.

Installation & Updating

Information about installing and updating extensions can be found in the Symphony documentation at http://symphony-cms.com/learn/.

Config

Path lets you define a destination other than /workspace, i.e. outside your publicly accessible directories. Please make sure that destination is writeable by PHP. The path is relative to the constant DOCROOT, it must begin with a slash and must not end with one.

Format lets you define a custom file naming scheme. %1$s is the placeholder for the mode (authors/data). You can use any other PHP function as long as you don't interfere with sprintf's formatting rules (i.e. '%1$s-'.date('Ymd').'.sql' can be used).

The default path is /workspace, the default format is %1$s.sql

For example (this will place the file outside your installation-directory):

    ###### DUMP_DB ######
    'dump_db' => array(
        'format' => '%1$s.sql',
        'path' => '/../sql'
    ),
    ########

These config-parameters enable you to:

  • Append a timestamp to your filenames. That way you will be able to go back to older versions of the database.
  • Move the file outside your publicly accessible directories.

Any mixture of the options above is possible.

To enable the restore-feature you need to do so manually using the following line in your array:

    'restore' => 'yes'

Database downloads

In some occasions you don't want DumpDB to save your database into the files on your server (i.e. a server that can only pull from your repositories). For these cases you can provide an option like

    'dump' => 'download'

or

    'dump' => 'text'

This will either force your browser to download the dump or display it as text in your browser window without touching the files on your server. An additional help-text will be displayed showing that you're in one of these two modes.

Version history

Requires Symphony 2.4

  • Symphony 2.5 compatibility

Requires Symphony 2.4

  • Fixed syntax errors that rendered extension unusable.
  • Fixed mysql_real_escape_string issue.

Requires Symphony 2.4

  • Fixed minor oversights in 2.4 compatibility.
  • Added Italian and Romanian translation

Requires Symphony 2.4

  • Symphony 2.4 compatibility

Symphony 2.3 only

  • Symphony 2.3 compatibility

Requires Symphony 2.2

  • Search Index compatibility.
  • Due to the potentially huge size in search index indexes their data isn't being saved. Dumps will contain only their structure but not their content.
  • Note that after importing a dump all your indexes will be gone so you'll have to re-index them.

Requires Symphony 2.2

  • Symphony 2.2 compatibility.
  • Removed hash and date from filename. Hash isn't needed as .sql files are now protected by .htaccess and date can be injected in the filename without the need for sprintf.

Requires Symphony 2.0.7

  • Extension will now dump and restore both data and authors into two seperate files.

Requires Symphony 2.0.7

  • Extension will now show a notification on every backend page if one of the dump files is newer than your database.
  • Also, it will show a notification and disable the "Dump"-buttons if one of the files isn't writeable.

Requires Symphony 2.0.7

  • New function to restore database from dump.
  • Be advised that this feature may not work in some cases.
  • To enable this feature you need to activate it manually in your config file.

Requires Symphony 2.0.7

  • New Config parameters path and format.

Requires Symphony 2.0.7

  • Dump-file will now have a random hash in its filename for security reasons.

Requires Symphony 2.0.7

  • Dump is now being saved into /workspace/dump.sql instead of offered for download.

Requires Symphony 2.0.7

  • Prevented dumping data of cache and sessions tables.

Requires Symphony 2.0.7

  • Initial release. Mainly a copy of Alistairs Export Ensemble.