Back up and restore databases from the Linux app

Abierto
#3,654 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
35/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
linux, mariadb, mysql, postgresql, sqlite, swift

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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

Lenguaje dominante
Swift
Estrellas
6.2k
Forks
412
Merge medio
3 h 56 min
PR fusionados (30 d)
669

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de TableProApp/TablePro

Todos los issues de TableProApp/TablePro

Issues similares

Más issues de Swift

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.