Skip to main content

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

Metadata

Release files for flatback 1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for flatback 1.0
File Size Uploaded
flatback-1.0.tar.gz 5.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for flatback 1.0
File Interpreter ABI Platform
flatback-1.0-py3-none-any.whl Python 3 none any Details

Total release size: 11.1 kB

Release files / flatback-1.0.tar.gz

Download URL flatback-1.0.tar.gz
Size 5.3 kB
Tags Source
SHA-256 checksum
How to use checksums
a32dc27046f2ca0d19e7435ecdf27e1c4a66356dbff0e9bf5ad51d2c47f8647c
BLAKE2b-256 checksum
How to use checksums
32cd284feda10689b3a1083ebd71d61c6c0bdca38d2b0d4e9ab7848c7b3b133d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.12

Release files / flatback-1.0-py3-none-any.whl

Download URL flatback-1.0-py3-none-any.whl
Size 5.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
93a3399f3e096a4ef58afcbfb96801a3953ae38412a764b5d8e7958137abbc8f
BLAKE2b-256 checksum
How to use checksums
e47ee46b2a0f1562b76eff936c19979e6159583516a92f27d129220662afeb8f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.12

Release history Release notifications | RSS feed

This release

1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page