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.x | 2.1.x | 2.2.x | 2.3.x | 2.4.x | 2.5.x | 2.6.x | 2.7.0 | 2.7.1 | 2.7.2 | 2.7.3 | 2.7.4 | 2.7.5 | 2.7.6 | 2.7.7 | 2.7.8 | 2.7.9 | 2.7.10 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| No | No | 1.09 | 1.10 | 1.12 | No | No | No | No | No | No | No | No | No | No | No | No | No. Soon? |
Readme
Dump DB
This extension exports your Symphony database
- Version: 1.12
- Date: 15th October 2014
- Requirements: Symphony 2.4 or above
- Author: Nils Werner, [email protected]
- Constributors: A list of contributors can be found in the commit history
- GitHub Repository: http://github.com/nils-werner/dump_db
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_stringissue.
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
.sqlfiles are now protected by.htaccessand 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
pathandformat.
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
cacheandsessionstables.
Requires Symphony 2.0.7
- Initial release. Mainly a copy of Alistairs Export Ensemble.