Skip to content

Research database backup strategies #310

@josecelano

Description

@josecelano

Overview

Research and document backup strategies for SQLite databases, MySQL databases, and configuration files used in Torrust Tracker deployments. This is a pure research task focused on learning and collecting information about available tools, techniques, and approaches.

Specification

See detailed specification: docs/issues/research-database-backup-strategies.md

(Link will be updated after file rename with issue number)

🏗️ Architecture Requirements

DDD Layer: N/A (Research task - documentation only)
Module Path: docs/research/backup-strategies/
Pattern: Research documentation

Research Scope

This is a pure research and learning task - no code implementation or specific design proposals are required. Focus on understanding and documenting available tools, techniques, and approaches.

Implementation Plan

Phase 1: SQLite Research (4-6 hours)

  • Research safe file copy approaches while database is in use
  • Investigate compression tools and techniques
  • Learn about cloud volume attachment and snapshot strategies
  • Analyze Torrust Live Demo backup script implementation
  • Document findings in docs/research/backup-strategies/sqlite-backup-strategies.md

Phase 2: MySQL Research (4-6 hours)

  • Research mysqldump usage and locking behavior
  • Investigate physical backup tools (Percona XtraBackup)
  • Learn about Docker volume backup strategies
  • Study cloud redundancy options for MySQL backups
  • Document findings in docs/research/backup-strategies/mysql-backup-strategies.md

Phase 3: Configuration Research (2-3 hours)

  • Identify all configuration files and directories
  • Research file copy and archive tools
  • Study configuration storage strategies
  • Document findings in docs/research/backup-strategies/configuration-backup-strategies.md

Phase 4: Backup Scope Strategies (2-3 hours)

  • Research full storage backup approaches
  • Compare database-only backup patterns
  • Study selective backup strategies
  • Document trade-offs in docs/research/backup-strategies/backup-scope-strategies.md

Phase 5: Documentation Review (1 hour)

  • Review all research documents for completeness
  • Create README in research folder with overview
  • Run linters and ensure documentation quality

Total Estimated Time: 12-18 hours

Acceptance Criteria

Note for Contributors: These criteria define what the PR reviewer will check. Use this as your pre-review checklist before submitting the PR.

Quality Checks:

  • Pre-commit checks pass: ./scripts/pre-commit.sh

Research Documentation:

  • SQLite backup approaches documented (safe copying, compression, redundancy)
  • MySQL backup approaches documented (tools, techniques, containerization)
  • Configuration backup approaches documented
  • Backup scope strategies compared
  • Torrust Live Demo implementation analyzed and documented
  • Cloud redundancy strategies documented (volumes, S3, snapshots)
  • Compression techniques compared
  • All findings organized in docs/research/backup-strategies/ folder
  • README created in research folder with overview

Documentation Quality:

  • Markdown linting passes
  • Spell checking passes
  • All links valid and properly formatted

Key Research Questions

  1. Safety: How to backup databases safely while in production use?
  2. Tools: What tools exist for copying, compressing, and storing backups?
  3. Redundancy: How to ensure backups are stored redundantly in cloud environments?
  4. Scope: What are the trade-offs of different backup scopes (full vs selective)?
  5. Current Practice: How does the Torrust Live Demo handle backups today?

Related

Context

The Torrust Live Demo currently implements SQLite backups with daily generation, compression, 7-day rotation, and no database locking. This research will analyze that implementation and explore alternatives for both SQLite and MySQL.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions