Skip to main content

Backup and restore Flatpak applications for offline transfer

Project description

Flatback

This is a simple script utility to back up and restore Flatpak applications for offline transfer.

Packages a Flatpak app together with its runtime into a single .tar.gz archive (or directory), including a YAML manifest. Ideal for moving apps to offline computers or preserving deprecated packages.

Install

pip install flatback

Requires flatpak to be installed on the system.

Usage

Backup

flatback backup org.popular.emulator
flatback backup org.popular.emulator -o emulator-backup.tar.gz
flatback backup com.slack.Slack --no-tar
flatback backup com.google.Chrome --system
flatback backup org.popular.emulator --data

Restore

flatback restore org.popular.emulator.tar.gz
flatback restore emulator-backup.tar.gz
flatback restore com.slack.Slack/
flatback restore com.google.Chrome.tar.gz --system
flatback restore org.popular.emulator.tar.gz --data
flatback restore org.popular.emulator.tar.gz --no-data

How It Works

Backup bundles the app and its runtime into .flatpak files using flatpak build-bundle, then packages everything with a flatback.yml manifest into a .tar.gz.

Restore extracts the archive, reads the manifest, and installs the runtime and app bundles using flatpak install --bundle.

Manifest Example (flatback.yml)

app:
  app_id: org.popular.emulator
  arch: x86_64
  branch: stable
  installation: user
  origin: flathub
app_bundle: app_org.popular.emulator_x86_64_stable.flatpak
flatback_version: '1.0'
has_data: true
runtime:
  app_id: org.kde.Platform
  arch: x86_64
  branch: 5.15-23.08
  installation: user
  origin: flathub
runtime_bundle: runtime_org.kde.Platform_x86_64_5.15-23.08.flatpak
version: mainline-0-1734

Arguments

flatback backup

Argument Description
app_id Flatpak application ID (e.g. org.popular.emulator)
-o, --output Output path (default: <app_id>.tar.gz)
--no-tar Save as directory instead of tar.gz
--data Include user data (~/.var/app/<app_id>) in backup
--system Use system installation instead of user

flatback restore

Argument Description
source Path to backup .tar.gz or directory
--data Restore user data without prompting
--no-data Skip user data restore without prompting
--system Install to system instead of user

Project details


Release history Release notifications | RSS feed

This version

1.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

flatback-1.0.tar.gz (5.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

flatback-1.0-py3-none-any.whl (5.8 kB view details)

Uploaded Python 3

File details

Details for the file flatback-1.0.tar.gz.

File metadata

  • Download URL: flatback-1.0.tar.gz
  • Upload date:
  • Size: 5.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for flatback-1.0.tar.gz
Algorithm Hash digest
SHA256 a32dc27046f2ca0d19e7435ecdf27e1c4a66356dbff0e9bf5ad51d2c47f8647c
MD5 6df0eabd49230d2840a39665ec8a7c14
BLAKE2b-256 32cd284feda10689b3a1083ebd71d61c6c0bdca38d2b0d4e9ab7848c7b3b133d

See more details on using hashes here.

File details

Details for the file flatback-1.0-py3-none-any.whl.

File metadata

  • Download URL: flatback-1.0-py3-none-any.whl
  • Upload date:
  • Size: 5.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for flatback-1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 93a3399f3e096a4ef58afcbfb96801a3953ae38412a764b5d8e7958137abbc8f
MD5 448941e3a653071939af42ae944a1eab
BLAKE2b-256 e47ee46b2a0f1562b76eff936c19979e6159583516a92f27d129220662afeb8f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page