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.
pip install flatbackRequires flatpak to be installed on the system.
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 --dataflatback 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-dataBackup 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.
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| 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 |
| 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 |