定制 aimeos/pagible-backup 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

aimeos/pagible-backup

Composer 安装命令:

composer require aimeos/pagible-backup

包简介

Pagible CMS - Backup and restore

README 文档

README

Backup and restore for Pagible CMS with per-tenant data export, media files, integrity verification, and cross-tenant restore. Supports SQLite, MySQL, MariaDB, PostgreSQL, and SQL Server.

For installation, use:

composer require aimeos/pagible-backup

This package is part of the Pagible CMS monorepo.

Configuration

The backup package uses these settings from the core configuration (config/cms.php):

Config Key Default Description
cms.db sqlite Database connection name
cms.disk public Storage disk for media files

Commands

cms:backup

Creates a backup of all CMS data for a tenant.

php artisan cms:backup [options]
Option Default Description
--tenant current tenant Tenant ID to backup
--disk local Storage disk for the backup ZIP file
--keep Number of backups to keep (deletes oldest)
--no-media Skip media files

Creates a ZIP archive named pagible-{tenant}-{timestamp}.zip containing NDJSON exports of all cms_* tables and media files. Includes a manifest with SHA-256 checksums for integrity verification.

cms:restore

Restores CMS data from a backup.

php artisan cms:restore [file] [options]
Option Default Description
file Backup ZIP filename
--tenant from manifest Target tenant ID (enables cross-tenant restore)
--disk local Storage disk containing the backup
--merge Merge (upsert) instead of replacing existing data
--no-media Skip media files
--media-only Only restore media files
--list List available backups
--verify Verify backup integrity without restoring
--force Skip confirmation prompts

Examples:

# List available backups
php artisan cms:restore --list

# Verify backup integrity
php artisan cms:restore pagible-tenant1-20250101.zip --verify

# Restore to a different tenant
php artisan cms:restore pagible-tenant1-20250101.zip --tenant=tenant2

# Merge without replacing existing data
php artisan cms:restore pagible-tenant1-20250101.zip --merge

Events

Event Properties Description
BackupCreated $tenant, $path, $counts Dispatched after successful backup
RestoreCompleted $tenant, $file, $counts Dispatched after successful restore
RestoreFailed $tenant, $error Dispatched when restore fails

License

LGPL-3.0-only

统计信息

  • 总下载量: 4
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 11
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: LGPL-3.0-only
  • 更新时间: 2026-05-06

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固