Back up and restore databases from the Linux app

未关闭
#3,654 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
35/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
活跃
技术栈
linux, mariadb, mysql, postgresql, sqlite, swift
领域
databases, desktop

调研方向

Read linux/ROADMAP.md, features/backup-restore.mdx, and the Flatpak decision at linux/docs/decisions/0008-flatpak-sandbox-permissions.md; compare the Linux package manifests and current export flow. First decide whether the feature belongs in the backlog and how Flatpak will handle client tools. Done means PostgreSQL and SQLite backup and restore work from the app on PPA and COPR packages.

由索引模型根据 Issue 内容生成。

描述

enhancement platform-linux
Problem

The Linux app cannot back up or restore a database. linux/ROADMAP.md, Backlog, Ideas lists "backup and restore" as not committed. The macOS app has both (features/backup-restore.mdx).

Two facts shape how it can work on Linux:

  • For PostgreSQL and MySQL the usual tools are pg_dump, pg_restore, mysqldump and mariadb-dump, programs on the host. Neither package depends on them today (linux/build-aux/debian/control, linux/build-aux/rpm/tablepro.spec).
  • The Flatpak cannot run host programs (linux/docs/decisions/0008-flatpak-sandbox-permissions.md, Consequences), so it would need its own copies or no backup at all.
Proposed solution
  • Decide whether backup and restore move from Ideas into the backlog, and record it in linux/ROADMAP.md.
  • If yes, a first version:
    • Back Up a database to a file, run off the GTK thread with progress and Stop, as exports run today.
    • SQLite with VACUUM INTO, through the driver, with no outside tool.
    • PostgreSQL with pg_dump in custom or plain format, and MySQL and MariaDB with mysqldump or mariadb-dump, found on PATH, with the packages recommending the client tools.
    • The password goes to the tool through a private file or the environment, never the command line, and an SSH tunnel's local forward is the host it connects to.
    • Restore from a file asks first, names the target database, and is refused on a read-only connection.
    • SQL Server and ClickHouse back up on the server's side, to paths on the server; leave them out of the first version, or offer only the statement, previewed.
  • Decide for the Flatpak: bundle the client tools, or show that backup needs the distribution package.

Done means: a PostgreSQL and a SQLite database can be backed up to a file and restored from it, from the app, on the PPA and COPR packages.

Alternatives considered

Run pg_dump or mysqldump in a terminal, through the same SSH tunnel by hand.

Platform

Linux

Related database type

N/A / General

主要语言
Swift
星标
6.2k
派生
412
平均合并
3 小时 56 分钟
30 天内合并 PR
669

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

TableProApp/TablePro 的其他 Issue

查看 TableProApp/TablePro 的全部 Issue

相似的 Issue

更多 Swift Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。