pjanser/craft-db-extract

This package is abandoned and no longer maintained. No replacement package was suggested.

A small helper Plugin for CraftCMS to download the DB over HTTP requiring authorization.

1.1.0 2021-05-14 19:05 UTC

README

A small helper Plugin for CraftCMS to download the DB over HTTP requiring authorization.

Screenshot

Requirements

This plugin requires Craft CMS 3.0.0-beta.23 or later.

Installation

To install the plugin, follow these instructions.

  1. Open your terminal and go to your Craft project:

     cd /path/to/project
    
  2. Then tell Composer to load the plugin:

     composer require pjanser/craft-db-extract
    
  3. In the Control Panel, go to Settings → Plugins and click the “Install” button for craft-db-extract.

craft-db-extract Overview

This plugin makes a web controller action available to pull the database export.

Using craft-db-extract

The controller action requires an admin login. Provide your credentials in the Authoirization header with basic authentication.

HTTP Header:

Authorization: Basic xxxxxxxxxxxx

Tip: If you experience 401 Unauthorized eventhough you provide correct admin credentials, you can try to add the following line to your .htaccess:

SetEnvIf Authorization (.+) HTTP_AUTHORIZATION=$0

Pulling the database in *.sql format:

GET YOUR_WEBSITE/actions/craft-db-extract/db-export

Pulling the database in *.sql.gz format:

GET YOUR_WEBSITE/actions/craft-db-extract/db-export?compression=gzip

craft-db-extract Roadmap

Some things to do, and ideas for potential features:

  • Authorization with user token
  • Add different compressions
  • Configurable filename for response

Brought to you by P. Janser