Skip to content

v0.7.0

Choose a tag to compare

@github-actions github-actions released this 21 Aug 04:26
· 3 commits to master since this release
feat: v0.7.0 — backup database độc lập (tab Backup DB + CLI)

Phơi module Backup sẵn có thành tính năng backup DB độc lập (không gắn sync):
- Backup::backup_full_db(): dump TOÀN BỘ bảng theo prefix của site này ra
  .sql.gz (gzip, ngoài webroot, .htaccess deny). Dùng chính $wpdb->dbh.
- Backup::delete()/file_path() thêm mới; list_backups/restore/rotation tái dùng.
- Tab "Backup DB": nút "Backup ngay" + rotation (giữ N bản) + bảng backup
  (loại DB/Sync, số bảng, dung lượng) với Tải về / Khôi phục / Xoá.
- Download: admin-post handler stream .sql.gz (ngoài webroot) có nonce + cap.
- Actions: backup_db (lưu rotation + dump), delete_backup.
- CLI: `wp vig-sync backup-db` + `wp vig-sync backups`.

Test wplab: backup 52 bảng 78KB ngoài webroot; restore round-trip (đổi
option → restore 124 stmt/0 lỗi → về nguyên); list/type/delete; tab render;
CLI backup-db + backups. Không đụng luồng sync/Monitor.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>