Skip to content

Repository files navigation

VitoDeploy Database Exporter

A VitoDeploy plugin for creating secure, queued native database exports through a guided GUI.

Features

  • MySQL, MariaDB, and PostgreSQL support through Vito's native backup templates
  • Server-preselected entry point from Server → Features
  • Ready-state, engine, and remote disk-space safety checks
  • Private mode-700 remote workspace and mode-600 export files
  • Streamed SSH transfer without loading the SQL dump into PHP memory
  • Authenticated, project-scoped download URLs
  • Configurable download retention with automatic local and remote cleanup
  • Compressed-size limits, transfer-size verification, gzip validation, and SHA-256 checksums
  • Background progress, redacted operational logs, cancellation, and retry
  • Responsive light/dark interface matching VitoDeploy Database Importer

Workflow

  1. Select a Vito server.
  2. Select a ready database.
  3. Choose a download filename and retention period.
  4. Run blocking safety checks.
  5. Start the export through Vito's ssh queue.
  6. Download the generated .sql.gz file before it expires.

Vito's administrative database access performs the native dump. Database user passwords are never requested or written to export logs.

Installation

In Vito, open Admin → Plugins → Install, then enter:

https://github.com/cp6/VitoDeploy-Database-Export/

Keep the trailing slash when installing on Vito versions that trim .git from repository URLs. Those versions can otherwise remove the final t from a repository name ending in Export and incorrectly report that it has no released versions.

Install and enable the latest release. The exporter appears under Server → Features → Database Exporter and at /database-exporter.

The normal Vito queue worker must process the ssh and default queues.

Configuration

The plugin defaults are in config/database-export.php:

Setting Default Purpose
disk local Private Laravel filesystem disk used for completed exports
retention_hours 1, 6, 24, 72 Allowed download-retention choices
default_retention_hours 24 Default download lifetime
failed_run_retention_hours 24 Failed-run log retention
max_export_mb 8192 Maximum compressed export size
minimum_remote_free_mb 512 Required free space before export
drop_tables_on_uninstall false Whether uninstall removes plugin metadata

Environment overrides:

VITO_DATABASE_EXPORT_DISK=local

Use a private disk only. The download controller performs authentication and ownership checks; export files should not be placed on a directly public filesystem.

Security model

  • Only users with write access to the selected database can start or download an export.
  • Every run is scoped to its creator and current Vito project; Vito administrators retain recovery access.
  • Database and server identifiers are revalidated against the current project before queueing.
  • The remote artifact lives in a private directory and is deleted in the job's finally block.
  • Completed downloads are sent with private, no-store and nosniff headers.
  • Expired artifacts are deleted by a delayed cleanup job and opportunistic page cleanup.
  • Filenames are normalized and cannot contain paths or unsafe characters.

Development

composer validate
npm install
npm run build:css

Run the plugin tests from a Vito checkout with this repository installed as a development plugin.

License

MIT

About

Secure queued database exports for VitoDeploy with a guided GUI.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages