mackup-ng
Backup and keep your application settings in sync.
mackup-ng is a maintained fork of mackup by Laurent Raufaste. It replaces the backup/restore/link commands with a single two-way
syncplus anrmcommand, while keeping the same on-disk conventions (config.toml, theMackupstorage folder).⚠️ Incompatible with the original
mackup. This package installs amackupcommand (and amackup-ngalias) that shadows the upstreammackup— do not install both in the same environment, or the last one installed wins. The on-disk format also diverges: mackup-ng records deletion tombstones (.mackup-deletions) and syncs by modification time, so a folder written by mackup-ng is not meant to be managed by the original mackup.
Table of contents
- mackup-ng
Quickstart
# Install mackup-ng with pip
pip install --upgrade mackup-ng
# ...or as an isolated tool with uv
uv tool install mackup-ng
# Launch it and sync your files
mackup-ng sync
You're all set and can back up from now on.
Next, on any new workstation, do:
# Install mackup-ng
pip install --upgrade mackup-ng
# Launch it and sync your files
mackup-ng sync
Done!
You can find more detailed instructions in INSTALL.md.
Usage
mackup-ng init <path>
Set up this machine: write the config pointing at <path> as the backup
folder, then run the first sync.
That first sync is not an ordinary one. The backup side wins every contest, whatever the timestamps say, because on a fresh machine the applications you have just installed have already written their default configs — with today's timestamp. Under the ordinary newest-wins rule those defaults would beat the real settings in the backup folder, and the next sync would spread them to every other machine.
A path inside your home folder is recorded relative to it, so the config stays
correct on a machine whose home lives elsewhere. init refuses if a config
already exists; it sets up a new machine rather than repointing a working one.
mackup-ng sync
Synchronize your application files between your home folder and the Mackup folder.
mackup-ng rm <path>
Remove a managed config path locally and from the Mackup folder, and record the deletion so future syncs remove it on other machines too.
mackup-ng info <path>...
Report how a path relates to the backup: the config that manages it, whether it is synced (and why not, when it isn't), both copies with their size and mtime, what the last sync on this machine did to it, and whether the two sides still agree. Exits with status 1 when a path is managed by no config.
$ mackup-ng info ~/.zshrc
Path: .zshrc
Config: zsh (Zsh)
Sync: yes
Local: /home/you/.zshrc — 8.9 KiB, 2026-08-17 13:33
Backup: /home/you/Sync/Configs/Mackup/.zshrc — 8.5 KiB, 2026-08-14 09:02
Last sync: 2026-08-14 09:02 (Backed up)
State: diverged — local is newer; next sync backs it up
The "Last sync" line comes from a machine-local log that mackup-ng sync
writes to $XDG_STATE_HOME/mackup/sync-log.json; it reads never recorded on this machine until the first sync after upgrading.
mackup-ng list
Display the list of applications supported by mackup-ng.
mackup-ng mark <marker> / mackup-ng unmark <marker> / mackup-ng markers
Set / remove / list machine-local markers (e.g. backup, low-resource,
no-linger, no-apikey, no-dconf). See "Machine-local extras" below.
mackup-ng dconf-add <path>...
Track and dump dconf path(s), e.g. /org/gnome/terminal/ (Linux/GNOME).
mackup-ng apply
Run every config's action blocks (without syncing files); blocks also run
automatically during sync.
mackup-ng -h
Get some help, obviously...
What does it do
By only tracking pure configuration files, it keeps the crap out of your freshly new installed workstation (no cache, temporary and locally specific files are transferred).
mackup-ng makes setting up the environment easy and simple.
mackup-ng uses sync mode.
Sync mode
Sync mode is used to synchronize your files.
The files are stored in the one folder you set as storage.backup_dir.
It is covered by the commands:
mackup-ng syncmackup-ng rm <path>
sync reconciles every managed file in both directions by modification time.
To drop a single managed path everywhere, use mackup-ng rm <path>: it removes
the file locally and from the Mackup folder, and records a deletion tombstone so
future syncs remove it on your other machines too.
Ignored files
Storage backends drop their own bookkeeping inside the folders they sync.
Syncthing is the loud one: each concurrent edit leaves a *.sync-conflict-*
copy next to the file. mackup-ng carries none of it in either direction, and
deletes none of it either — those files belong to the tool that made them. A
fresh conflict copy is skipped when picking the newer side too, so it cannot
beat a real edit on another machine.
Patterns live in <name>.toml files with an [ignore] table, read from the
package, then $XDG_CONFIG_HOME/mackup/ignores/:
# ~/.config/mackup/ignores/mine.toml
[ignore]
name = "My junk"
patterns = ["*.bak", "*.orig"]
The built-in syncthing.toml covers *.sync-conflict-*, ~syncthing~*.tmp,
.syncthing.*.tmp, .stfolder, .stversions and .stignore. A local file of
the same name replaces the built-in outright, so this turns the whole set off:
# ~/.config/mackup/ignores/syncthing.toml
[ignore]
patterns = []
A single application config can add patterns that apply to its own paths only:
# ~/.config/mackup/applications/notes.toml
name = "notes"
files = [".notes"]
ignore = ["*.bak"]
Update check
At the end of mackup sync, mackup-ng checks whether a newer release is on
PyPI and prints one line if there is:
mackup-ng 2.1.0 -> 2.2.0 available. Upgrade: uv tool upgrade mackup-ng
The upgrade command is guessed from where the running executable lives (snap,
uv tool, pipx, or plain pip). The result is cached under
$XDG_CACHE_HOME/mackup/update-check.json for a day, so at most one request a
day leaves the machine, and a dry run (-n) never checks at all. Any failure —
offline, timeout, a bad answer — is silent.
The request goes to https://pypi.org/pypi/mackup-ng/json. It carries nothing
but the package name, though like any request it discloses the machine's IP
address and the fact that mackup-ng is in use. To switch it off for good on a
machine:
mackup-ng mark no-update-check
Storage
mackup-ng has no storage backends. It backs up into one folder, set as
storage.backup_dir in config.toml, and that is the whole of it:
[storage]
backup_dir = "Sync/Configs/Mackup"
Point it at whatever already syncs on your machine — a Syncthing share, a mounted drive, a cloud provider's local folder, a Git working copy, or a plain second directory you copy elsewhere yourself. mackup-ng never talks to a sync service; it only reads and writes that folder, so anything that can replicate a directory works.
Earlier versions detected Dropbox, Google Drive and iCloud folders for you. That is gone: the detection was three code paths that guessed a location, and naming the folder yourself is both shorter and unambiguous.
Supported Applications
- 1Password 4
- 2Do
- Ack
- act
- ActivityWatch
- Adium
- Adobe Camera Raw
- Adobe Illustrator CC
- Adobe Photoshop CC
- Adobe Photoshop Lightroom CC
- Adobe Photoshop Lightroom Classic
- aerc
- AeroSpace
- Affinity Designer
- Affinity Photo
- Affinity Publisher
- Airflow
- Airmail
- Akamai-CLI
- Alacritty
- AlDente
- AltTab
- Amethyst
- Ancient Domains of Mystery
- Android Studio
- Ansible
- AppCleaner
- AppCode
- Apple Music
- Apptivate
- Arara
- aria2c
- Arm
- Artistic Style
- asciinema
- asdf version manager
- Aspell
- Atlantis
- Atom
- Audacious
- AusKey
- Autokey
- Awareness
- AWS Command Line Interface
- Bartender
- Base
- Bash it
- Bash
- Bat
- Bc
- Beatport Pro
- Beets
- BetterSnapTool
- BetterTouchTool
- Beyond Compare
- BibDesk
- Billings Pro Server Admin
- BitBar
- Bitchx
- Blackfire
- ble.sh
- Blender
- Boto
- Boxer
- Brackets
- Brave
- Btop
- Bump
- Bundler
- Byobu
- Caffeine
- Calibre
- Capture One
- Cartographica
- Cerebro
- Charles
- Cheat
- Chef
- Chicken
- Choosy
- chunkwm
- Cider
- ClashX
- Clasp
- Claude Code
- CleanShot
- Clementine
- CLion
- ClipMenu
- Clipy
- CloudApp
- Coda 2
- Codex
- Colloquy
- ColorSchemer Studio 2
- ColorSlurp
- ColorSync
- Composer
- Concentrate
- Conky
- Consular
- Context7
- Contexts
- ControlPlane
- CopyQ
- CoRD
- CotEditor
- Ctags
- Cursor
- cVim
- Cyberduck
- DaisyDisk
- Dash
- DataGrip
- Day-O
- DBeaver
- DbVisualizer
- Deal Alert
- Deepin-dde-dock
- Deepin-dde-file-manager
- Deepin-Terminal
- Default Folder X
- Devil's Pie 2
- Devil's Pie
- dig
- Divvy
- Docker
- Dolphin
- Doom Emacs
- Double Commander
- Doxie
- Dozer
- Draft
- Droplr
- Dropzone 3
- Drush
- Eagle (ogdesign)
- EditorConfig
- Electrum
- Elgato StreamDeck
- Emacs
- Enjoyable
- Environmental Station Alpha
- eqMac2
- ESLint
- espanso
- Exercism
- ExpanDrive
- Factorio
- Factory Droid
- Fantastical
- fasd
- fastlane
- FastScripts
- Feeds
- FileZilla
- Finicky
- Fish
- Fisher
- Flake8
- Flameshot
- FlexGet
- Flux
- Focus
- Fontconfig
- FontExplorer X
- Forge
- Fork
- ForkLift
- Franz
- Gas Mask
- gdb
- Gear Player
- GeekTool
- GHCi
- Ghidra
- Ghostty
- Ghostwriter
- Gimp
- Git Hooks
- Git
- Gitbox
- GitFox
- GitHub CLI
- GitKraken
- GitUp
- Gmail Notifr
- gmailctl
- GMVault
- Gnome SSH Tunnel Manager
- GNU Stow
- GnuPG
- Go2Shell
- Goku
- GoLand
- Goldendict
- GoodSync
- GoShare
- Gradle
- GrandTotal 3
- grsync
- Hammerspoon
- HandBrake
- Hands Off!
- Hazel
- Helix
- Hero Lab
- Heroku
- HexChat
- Hexels
- Hocus Focus
- Homebrew
- Homebridge
- Houdini
- Hstr
- HTML Tidy
- Htop
- HTTPie
- hub
- Hyper.app
- HyperDock
- HyperSwitch
- i2cssh
- i3
- IDA Pro
- IdeaVim
- IINA
- Inkscape
- Insomnia
- IntelliJIDEA
- IPython
- Irssi
- iStat Menus
- iTerm2
- iTermocil
- Itsycal
- iTunes Scripts
- JankyBorders
- Janus
- Jitouch
- Joplin
- jrnl
- JS Beautifier
- JSHint
- Julia
- Jumpcut
- Jupyter
- k9s
- Kaggle
- Kaleidoscope
- Karabiner Elements
- Karabiner
- Kdenlive
- KeePassX
- KeePassXC
- KeepingYouAwake
- Keka
- Keybase
- Keyboard Maestro
- Keymo
- KeyRemap4MacBook
- Khd
- Kiro
- kitty
- Krew
- Kubectl
- Kwm
- LaTeXiT
- LaunchBar
- lazydocker
- lazygit
- Ledger
- Leiningen
- lf
- LibreOffice
- Liftoff
- Light Table
- LightPaper
- LimeChat
- Liquid Prompt
- LittleSnitch
- Livestreamer
- Logitech Options
- Logseq
- Lollypop
- Loopback
- Luftrausers
- LunarVim
- MacDive
- MacDown
- MacOSX
- MacVim
- Magic Launch
- MagicPrefs
- Magnet
- Maid
- Mailmate
- Mailplane
- mako
- Marked 2
- Marta
- MATLAB
- Maven
- Max
- Mendeley Desktop
- MenuMeters
- Mercurial
- MercuryMover
- Messages
- Micro
- Microsoft Azure CLI
- Microsoft Remote Desktop
- mise-en-place
- mitmproxy
- mkcert
- Mole
- MonoDevelop
- Moom
- Mosaic
- Mou
- mpd
- MPlayerX
- MPS Youtube
- MPV
- MTMR
- Multitouch
- Mumu
- MusicBrainz Picard
- MuteSpotifyAds
- mycli
- myrepos
- MySQL Workbench
- MySQL
- Name Mangler
- Nano
- Navicat
- ncmpcpp
- Neofetch
- neovim
- Nethack
- Netlify
- newsbeuter
- ngrok
- ni
- Nomacs
- NoSQLBooster for MongoDB
- notion-enhancer
- Nova
- npm
- npmrc
- NSLogger
- nuget
- Nushell
- nvALT
- nvm
- nvpy
- OBS
- OfflineIMAP
- Oh My Fish
- Oh My Tmux
- okta-awscli
- OmniFocus
- OmniGraffle
- Openbox
- OpenCode
- OpenEmu
- OpenSSH
- Opera
- Oracle Cloud Infrastructure CLI
- Paintbrush
- Pandoc
- Pass
- Pastebot
- Path Finder
- PDFjam
- Pear
- Pentadactyl
- Perl
- Phoenix
- PhoneView
- PhpStorm
- PicGo
- Pidgin
- PIP
- PixelSnap 2
- PixelSnap
- Planner
- Plover
- Pnpm
- Pock
- Podman
- Poedit
- Poetry
- PokerStars
- Polybar
- PopClip
- Popcorn-Time
- PostgreSQL
- Postico
- Pow
- Powerlevel10k
- Powerline-shell
- Powerline
- Prezto
- Processing
- Proselint
- ProxyChains NG
- ProxyChains
- Proxyman
- PrusaSlicer
- PsySH
- Punto Switcher
- PyCharm
- PyPI
- PyRadio
- Querious
- Quicksilver
- Quitter
- Qutebrowser
- Qv2ray
- R
- Rails
- Ranger
- Rbenv
- Rclone
- Rectangle
- Redshift Scheduler
- Redshift
- Remote Desktop Manager
- Rhythmbox
- Rime
- ripgrep
- Robo 3T
- Rocket
- Rofi
- Royal TSX
- RStudio
- rTorrent
- rtx
- rubiTrack 5
- Rubocop
- Ruby Version Manager
- Ruby Version
- Ruby
- RubyMine
- Rust
- RustRover
- S3cmd
- SABnzbd
- SBCL
- SBT
- Scenario
- Screen
- Screenhero
- Scrivener
- Scroll Reverser
- Secure Pipes
- SecureCRT
- Seil
- SelfControl
- Sequel Pro
- ShadowsocksX-NG
- ShiftIt
- Shifty
- Shimo
- ShowyEdge
- SHSH Blobs
- Shuttle
- SizeUp
- Sizzy
- SketchyBar
- skhd
- Skim
- Skitch
- Slate
- Slic3r
- Slogger
- SmartGit
- Smooth Mouse
- Soulver
- SourceTree
- SpaceLauncher
- Spacemacs
- SpaceVim
- SpamSieve
- Spark
- Spectacle
- Spectrwm
- Splice
- Spotify Notifications
- Spotify
- Sqitch
- Starship
- Startupizer2
- Stata
- Stats
- Stay
- Storyist
- Subler
- Sublime Merge
- Sublime Text
- Subversion
- SuperDuper!
- Surge
- Sway
- Swinsian
- Swish
- SwitchHosts
- T
- TablePlus
- TaskPaper
- Taskwarrior
- Teamocil
- Telegram for macOS
- Terminal
- Terminator
- termite
- Termux
- Terraform
- TextExpander
- TextMate
- Textual
- Things
- Tig
- Tiles
- Tilix
- Timeout
- tint2
- TinyFugue
- Tmux
- Tmuxinator
- Tmuxp
- Todo.txt CLI
- ToothFairy
- TotalSpaces2
- Tower
- Transmission
- Transmit
- TripMode
- Trizen
- Tunnelblick
- tvnamer
- Twitterrific
- Typinator
- Typora
- Übersicht
- ulauncher
- uTorrent
- Ventrilo
- Verdaccio
- Versions
- Vim
- Vimperator
- Vimwiki
- Viscosity
- Visual Studio Code - Insiders
- Visual Studio Code - OSS
- Visual Studio Code
- Visual Studio for Mac
- VLC
- Volt
- VSCodium
- Wakatime
- Warp
- waybar
- WebStorm
- WezTerm
- Wget
- WhatsApp Web
- Windsurf
- Wireshark 2
- Witch
- WordGrinder
- WordPress WP-CLI
- Workrave
- X11
- Xamarin Studio
- xbar
- XBindKeys
- Xchat
- Xcode
- Xee
- XEmacs
- XLD
- Xonsh
- XtraFinder
- yabai
- yarn
- yazi
- youtube-dl
- Yummy FTP
- zabbix-cli
- zathura
- zed
- Zoom
- zoxide
- Zsh
Can you support application X
We can with your help ;)
Personalization & configuration
Have an application that shouldn't be generally supported but that you use?
Or some personal files you want to sync, e.g. various config files in a ~/.config/
directory or your personal ~/.gitignore?
- Create files under
~/.config/mackup/applications/to sync an application or any file or directory
Fork Additions
This fork adds path templating for application config definitions (*.toml in
src/mackup_ng/applications) to reduce duplication and simplify cross-platform
entries. App definitions are flat TOML (no [application] wrapper):
top-level name and a files array (plus an optional
[mapped_files] table and action blocks). A legacy [application] table is
still accepted.
1. Brace expansion ({...})
You can define multiple paths in one line:
name = "Code"
files = [
"${MACKUP_XDG_CONFIG}/Code/User/{snippets,keybindings.json,settings.json}",
]
This expands to one entry per item (cartesian product if multiple brace groups are used).
2. Platform selector ([...])
You can choose different path fragments per platform:
files = [
"${MACKUP_XDG_CONFIG}/[mac:Blender,blender]",
]
Another example with a full-path fallback:
files = [
"[linux:${MACKUP_XDG_CONFIG}/myapp/linux.conf,mac:${MACKUP_XDG_CONFIG}/MyApp/mac.conf,windows:${MACKUP_XDG_CONFIG}/MyApp/windows.conf,${MACKUP_XDG_CONFIG}/myapp/other.conf]",
]
linux:,mac:,windows:are supported keys- the last unkeyed item is the fallback
- in this fork, the fallback also acts as the canonical backup path
This means the selector can map different local paths to one shared backup path. Example:
files = [
"[mac:${MACKUP_XDG_CONFIG}/MyApp/config.json,linux:${MACKUP_XDG_CONFIG}/myapp/config.json,${MACKUP_XDG_CONFIG}/shared/myapp-config.json]",
]
Behavior:
- macOS local path:
${MACKUP_XDG_CONFIG}/MyApp/config.json - Linux local path:
${MACKUP_XDG_CONFIG}/myapp/config.json - backup path (all platforms): canonical Linux path for the fallback, i.e.
.config/shared/myapp-config.json
3. Built-in XDG variables
These reserved Mackup-owned aliases (not OS environment variables) mimic the XDG
base directories on every OS, even ones that don't set the XDG_* env vars.
The MACKUP_ prefix keeps them distinct from real ${VAR} env references; XDG
marks the semantics:
${MACKUP_XDG_CONFIG}->.config(Linux) /Library/Application Support(macOS) /AppData/Roaming(Windows)${MACKUP_XDG_DATA}->.local/share(Linux) /Library/Application Support(macOS) /AppData/Local(Windows)${MACKUP_XDG_STATE}->.local/state(Linux) /Library/Application Support(macOS) /AppData/Local(Windows)${MACKUP_XDG_CACHE}->.cache(Linux) /Library/Caches(macOS) /AppData/Local(Windows)
Important in this fork:
- built-in variables in local paths are resolved for the current OS
- built-in variables in backup paths are always resolved to Linux canonical paths
(e.g.
${MACKUP_XDG_CONFIG}in backup becomes.config)
4. Environment variables (${VAR} + source_env)
Any ${VAR} that is not a reserved MACKUP_* built-in is resolved as a real
environment variable, falling back to KEY=VALUE lines in the app's
source_env files. It expands to the same value on both the local and backup
side, so use it for relative, machine-specific fragments (a profile dir name,
a hostname). Unresolved or absolute results skip just that entry.
name = "Firefox"
source_env = ["~/.config/mackup-env"] # KEY=VALUE lines; env takes priority
files = [
"${MACKUP_XDG_CONFIG}/firefox/${FF_PROFILE}/prefs.js",
]
5. Processing order
Path templates are resolved in this order:
- Platform selector
[...](produces local path + canonical backup path) - Built-in variables (
${MACKUP_XDG_CONFIG},${MACKUP_XDG_DATA},${MACKUP_XDG_STATE},${MACKUP_XDG_CACHE}) - Environment variables (any other
${VAR}, from env /source_env) - Brace expansion
{...}
6. Config style in this fork
- Upstream-style
xdg_configuration_filesis not used in this fork; express entries directly infilesusing${MACKUP_XDG_CONFIG}/... - many app definitions in this fork were normalized to use
${MACKUP_XDG_CONFIG},${MACKUP_XDG_DATA}, and selectors to avoid macOS/Linux duplicates (for example VS Code-family configs)
7. Explicit local → backup mapping ([mapped_files])
files keeps the local path and storage layout identical. To
decouple them, add a [mapped_files] table with LOCAL = BACKUP pairs:
[mapped_files]
".config/app/grisa.profile/user.js" = ".config/app/profile/user.js"
Paths are quoted TOML strings, so spaces, dashes and even -> are safe inside
them. Both sides honor selectors, built-in vars and braces (brace groups zip
pairwise). Handy when a machine-specific local path (e.g. a per-machine Firefox
profile dir) should share one canonical path in the backup folder.
One backup file can feed several local files — repeat the value:
[mapped_files]
".config/app/work.profile/user.js" = ".config/app/profile/user.js"
".config/app/personal.profile/user.js" = ".config/app/profile/user.js"
All members of such a group are peers: whichever copy you edited last wins and
is propagated to the others on the next mackup sync.
Destinations are unique. If a later config maps the same local path to a
different backup file, the earlier mapping is dropped — that is how you
overwrite a stock config with your own. Configs are read stock first, then
$XDG_CONFIG_HOME/mackup/applications, so your own files always win. Run
mackup sync -v to see which mappings were overridden and which backup files
are left without a destination.
An orphaned backup file (no destination maps to it) is left untouched; it is
only reported by mackup sync -v, never deleted on its own. mackup rm <path>
removes one destination and tombstones it — the shared backup source survives
as long as another destination still feeds from it, and is only deleted once
the last destination is removed. Re-declaring a destination with the same
backup file is not an override and is not reported.
mackup rm also accepts a path inside a managed directory. Because the
members of a group mirror each other, such a removal is applied to the whole
group: the file goes from the backup source and from every destination, and
the tombstone keeps it from coming back on the next sync.
8. Units of work (action blocks)
A config file is not a file list with hooks bolted on either end — it is an
ordered sequence of units of work. A config whose top-level [when]
holds executes, in this order:
- its
[[block]]entries withphase = "pre", in declaration order - the top-level unit — the config's own
filesand[mapped_files], then its action if the top level carries one - its
[[block]]entries withphase = "during"— the default phase - its
[[block]]entries withphase = "post", in declaration order
Units are numbered by slot across that whole final order, not per phase.
Within one unit, files sync first, then its action runs. A block has an
optional [when] conditions sub-table, optional files, and at most one
action sub-table; there is no type key. A block may carry files, an
action, or both — files on a block work exactly like top-level files;
only the top level also takes [mapped_files]. [when] on a block gates
both its files and its action. Actions: [copy], [chmod], [run],
[xml] (edit XML), [systemd] (user drop-in).
name = "SSH"
files = [".ssh"]
# top-level unit: chmod runs right after .ssh syncs, in the same unit
[when]
os = ["linux", "macos"]
[chmod]
path = "~/.ssh"
recursive = true
dir_mode = "700"
file_mode = "600"
[when] keys (any-of lists): os, not_os, arch, marker, not_marker,
command, gui, exists, not_exists, env. For more than one block per
file use a [[block]] array with [block.when] / [block.<action>]; an
array entry defaults to phase = "during" unless it says otherwise. Configs
run sorted by filename; mackup apply runs every unit's action without
syncing files. A block-only file (no top-level files) is a pure hook.
The old <app>-macos split — a whole second TOML config file, with its own
application id, gated by a top-level [when] os = "macos" — is gone. Put
both variants in one config instead, as two blocks:
name = "AppCode 3.1"
[[block]]
files = [
"${MACKUP_XDG_CONFIG}/appCode31",
]
[block.when]
not_os = "macos"
[[block]]
files = [
"Library/Preferences/appCode31",
]
[block.when]
os = "macos"
Use not_os = "macos" rather than os = ["linux", "windows"] for
"everywhere but macOS": hooks.os_kind() reports android as its own value
(distinct from linux), so a hardcoded OS list silently drops an Android
machine's XDG paths, while not_os only excludes what it names.
mackup-ng show <app> prints the resolved file mappings and then a Units:
section listing every [[block]] the config declares, whether or not it ran
— slot N: <action> naming its action, or slot N: files only when it has
none, with a trailing — conditions not met (...) when its [when] didn't
hold. The implicit top-level unit is different: it shows up in Units: only
when the top level itself carries an action — a bare top-level files (and
[mapped_files]) with no action never appears there, even though its
mappings already showed up under Configuration files: above. This is how a
block dropped by [when] is named instead of silently vanishing.
Conditions written at the top level of a config gate the whole config — its synced files as well as its units' actions. A config whose conditions do not hold on this machine declares nothing, so a mapping from another config keeps the destination. That is how one machine can take a different source for the same local file:
# ~/.config/mackup/applications/zz-termux-colors-eink.toml
[when]
os = ["android"]
marker = ["eink"]
[mapped_files]
".termux/colors.properties" = ".termux/colors-eink.properties"
Run mackup show <app> to see whether a config's conditions hold here, and
mackup sync -v to list the configs skipped for that reason. To gate a
single unit's files and/or action instead of the whole config, put the
condition inside [[block]] as [block.when].
Top-level keys (files, mapped_files, etc.) must come before the
[when] header in the file. TOML assigns a bare key = value line to
whichever table opened above it — write files = [...] after [when] and it
becomes when.files instead of the config's own file list, so the config
silently syncs nothing. Loading a config warns about this: an unrecognized
key inside [when] or a [when] that isn't a table at all both print a
Warning: line naming the config and the problem.
9. Machine-local extras
Beyond custom app configs, mackup-ng splits its own state across the three XDG base directories:
$XDG_CONFIG_HOME/mackup/ (~/.config/mackup) synced
config.toml main config
applications/*.toml config *.toml files: sync lists AND action blocks
ignores/*.toml ignore definitions
markers/*.toml LOCAL marker DEFINITIONS (same format as apps)
$XDG_DATA_HOME/mackup/ (~/.local/share/mackup) synced
dconf-backup/*.dconf dconf dumps
$XDG_STATE_HOME/mackup/ (~/.local/state/mackup) NOT synced
markers/ marker STATE flags, machine-local
sync-log.json per-machine record of the last sync
Marker state (which markers are on) is the only part of this that is
machine-local and never synced; it lives under
$XDG_STATE_HOME/mackup/markers/ (default ~/.local/state/mackup/markers/).
Marker state is not the only machine-local state: sync also records what it
did to each destination in $XDG_STATE_HOME/mackup/sync-log.json, which is what
mackup-ng info reports as "Last sync". Both stay out of the synced backup
folder, since they describe this machine only.
mackup-ng backs up its own configuration through the same mechanism, via the
built-in Mackup profile (applications/mackup.toml): its file list is the
literal, home-relative paths .config/mackup and .local/share/mackup, not
dirs.config_dir() / dirs.data_dir(). If you point $XDG_CONFIG_HOME (or
$XDG_DATA_HOME) somewhere other than its default, mackup-ng itself keeps
working from the new location, but this profile keeps watching the old one —
so it silently stops syncing mackup's own configuration.
- Markers (
mark/unmark/markers) are empty flag files gating behavior on one machine only.backupmarks the source machine. - dconf (Linux/GNOME): the backup-role machine dumps tracked paths before the
file sync; other machines load them after. Opt out with the
no-dconfmarker; register paths withdconf-add. - Units of work (in
applications/*.toml, applied duringsync/ viaapply): a config is an ordered sequence of units —preblocks, the top-level unit (itsfiles/[mapped_files], then its action),duringblocks (the default phase),postblocks — numbered byslotacross that final order. A block = base scalars, a[when]conditions sub-table, optionalfiles, and at most one action sub-table whose name is the action ([copy]/[chmod]/[run]/[xml]/[systemd]); notypekey. Within a unit, files sync first, then its action runs. Base scalars:phase(pre/during/post, defaultduring) and optionalrestart_service.[when]gates both a block's files and its action, with short-keyed conditions (os,not_os,arch,marker,not_marker,command,gui,exists,not_exists,env). In a[[block]]array the sub-tables are[block.when]/[block.<action>]; at the top level[when]/[<action>](plusfiles/[mapped_files], top-level only). Configs apply sorted by filename — cross-cutting hooks use numeric prefixes (10-,40-). - Environment contract:
[run]blocks receive aMACKUP_*environment (MACKUP_PHASE,MACKUP_ROLE,MACKUP_OS,MACKUP_ARCH,MACKUP_HAS_GUI,MACKUP_CONFIG_DIR,MACKUP_DATA_DIR,MACKUP_STATE_DIR,MACKUP_BACKUP_DIR,MACKUP_MARKERS_DIR,MACKUP_DCONF_BACKUP_DIR). A pre-sync executable is a[run]block withphase = "pre".
Requires Python 3.12+.
Why this fork exists
Mackup was written by Laurent Raufaste on a premise worth keeping: application config files are small, portable, and the most annoying thing to lose when you reinstall a machine. A tool that moves them between a workstation and a folder saves hours every time.
mackup-ng keeps that premise and rebuilds nearly everything around it.
One two-way sync instead of three one-way commands. Upstream has backup,
restore and uninstall, each moving files in one direction, and it links
the originals into place with symlinks. mackup-ng has a single sync that
reconciles both sides by modification time and copies — no symlinks, so a
broken link cannot silently detach your home directory from the folder. rm
records a tombstone, so deleting a managed file removes it from both sides and
stays deleted instead of reappearing on the next run.
Application definitions are a small language, not just a file list. They
are flat TOML with brace expansion ({settings.json,keybindings.json}),
platform selectors ([mac:Blender,blender]), XDG variables, and a
[mapped_files] table for paths that differ between machines.
Configs can do things, not only be copied. A definition may carry action
blocks — [run], [copy], [chmod], [xml], [systemd] — gated by a
[when] table on OS, architecture, GUI presence, an installed command, or a
machine-local marker. mackup apply runs them without touching any files.
Machines differ, and the tool knows it. Markers such as backup,
low-resource, no-dconf or no-linger are set per machine, never synced,
and decide which side is the source of truth and which behaviour is skipped.
Linux is the first-class target. dconf paths are dumped on the backup machine and loaded on the others; systemd units get drop-ins; the layout follows the XDG base directory spec; and a built-in ignore definition keeps Syncthing's in-flight files out of your backups.
No storage backends. Upstream detects Dropbox, Google Drive and iCloud
folders. mackup-ng backs up into the one folder you name in backup_dir, and
leaves replication to whatever you already use for it.
The two are not compatible on disk or on the command line, which is why this is a fork with a different name rather than a set of patches.
It remains GPL, of course.
What platforms are supported
- macOS
- GNU/Linux
What's up with the weird name
Mackup is a portmanteau of Mac and Backup. It is simple, short, and easy to
remember, and it corresponds with the whole idea: the simpler – the better!
The -ng suffix ("next generation") marks this maintained fork, which
streamlines Mackup down to a single two-way sync plus rm.
Architecture
Want to understand how Mackup works internally? Check out the Architecture Guide which includes:
- Visual architecture diagram
- Component breakdown
- Data flow diagrams
- Design decisions
- Extension points for contributors
Perfect for contributors who want to understand the codebase or users curious about how their configs are managed.
Where can I find more information
In the doc directory.
Metadata
Release files for mackup-ng 3.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| mackup_ng-3.1.0.tar.gz | 327.1 kB | Without provenance | Details for mackup_ng-3.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mackup_ng-3.1.0-py3-none-any.whl | Python 3 | none | any | Details for mackup_ng-3.1.0-py3-none-any.whl |
Total release size: 590.3 kB
Release files / mackup_ng-3.1.0.tar.gz
| Download URL | mackup_ng-3.1.0.tar.gz |
|---|---|
| Size | 327.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
48142e2a5d5c25a811c928e685e4703f6a3fc2b38fc9fb391b86a59d0648b79d
|
|
BLAKE2b-256 checksum How to use checksums |
d4eeefe641699ae767c9d64cba238550ac4ad7ce9ad50c3894dc10c71036e8ff
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.13 {"installer":{"name":"uv","version":"0.12.13","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"CachyOS Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / mackup_ng-3.1.0-py3-none-any.whl
| Download URL | mackup_ng-3.1.0-py3-none-any.whl |
|---|---|
| Size | 263.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
52385771706559a05a33606f8f114ee92f5afb41e8e3d7035e4247c34b5fd3de
|
|
BLAKE2b-256 checksum How to use checksums |
1f6f18c3c8257236b1e7526af36d2feef4742aadbe76f71d23ebde098dda781a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.13 {"installer":{"name":"uv","version":"0.12.13","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"CachyOS Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for mackup-ng 3.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.