Skip to main content

mackup-ng

Tests PyPI version Python Versions Ruff mypy License

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 sync plus an rm command, while keeping the same on-disk conventions (.mackup.cfg, the Mackup storage folder).

⚠️ Incompatible with the original mackup. This package installs a mackup command (and a mackup-ng alias) that shadows the upstream mackup — 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

Quickstart

Install it with pip (or uv):

# 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 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 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-sets

Apply the declarative config sets in ~/.mackup/sets.d/ (also run automatically after 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 configured Mackup folder, which can be in Dropbox, iCloud, or wherever you configure it.

It is covered by the commands:

  • mackup-ng sync
  • mackup-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.

Supported Storages

See the README file in the doc directory for more info.

Unsupported Storages

Supported Applications

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?

Fork Additions

This fork adds path templating for application config definitions (*.cfg in src/mackup_ng/applications) to reduce duplication and simplify cross-platform entries.

1. Brace expansion ({...})

You can define multiple paths in one line:

[configuration_files]
@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:

[configuration_files]
@CONFIG@/[mac:Blender,blender]

Another example with a full-path fallback:

[configuration_files]
[linux:@CONFIG@/myapp/linux.conf,mac:@CONFIG@/MyApp/mac.conf,windows:@CONFIG@/MyApp/windows.conf,@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:

[configuration_files]
[mac:@CONFIG@/MyApp/config.json,linux:@CONFIG@/myapp/config.json,@CONFIG@/shared/myapp-config.json]

Behavior:

  • macOS local path: @CONFIG@/MyApp/config.json
  • Linux local path: @CONFIG@/myapp/config.json
  • backup path (all platforms): canonical Linux path for the fallback, i.e. .config/shared/myapp-config.json

3. Built-in cross-platform variables

These are Mackup-specific aliases (not OS environment variables):

  • @CONFIG@ -> .config (Linux) / Library/Application Support (macOS) / AppData/Roaming (Windows)
  • @DATA@ -> .local/share (Linux) / Library/Application Support (macOS) / AppData/Local (Windows)
  • @STATE@ -> .local/state (Linux) / Library/Application Support (macOS) / AppData/Local (Windows)
  • @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. @CONFIG@ in backup becomes .config)

4. Processing order

Path templates are resolved in this order:

  1. Platform selector [...] (produces local path + canonical backup path)
  2. Built-in variables (@CONFIG@, @DATA@, @STATE@, @CACHE@)
  3. Brace expansion {...}

5. Config style in this fork

  • Upstream-style xdg_configuration_files is not used in this fork; express entries directly in [configuration_files] using @CONFIG@/...
  • many app definitions in this fork were normalized to use @CONFIG@, @DATA@, and selectors to avoid macOS/Linux duplicates (for example VS Code-family configs)

6. Explicit local → backup mapping ([mapped_files])

[configuration_files] keeps the local path and storage layout identical. To decouple them, add a [mapped_files] section with LOCAL = BACKUP pairs:

[mapped_files]
.config/app/grisa.profile/user.js = .config/app/profile/user.js

= is the only delimiter, so spaces, dashes and even -> are safe inside paths. 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.

7. Machine-local extras (~/.mackup/)

Beyond custom app configs, ~/.mackup/ is the home for machine-local behavior:

~/.mackup/
├── applications/   custom app *.cfg files
├── backup.d/       executables run BEFORE `sync`
├── sets.d/         declarative config sets applied after `sync`
├── markers/        machine-local flags (do NOT sync them)
├── state/          hook scratch space
└── dconf-backup/   dconf dumps (*.dconf)
  • Markers (mark/unmark/markers) are empty flag files gating behavior on one machine only. backup marks 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-dconf marker; register paths with dconf-add.
  • Config sets (sets.d/*.toml, applied after sync / via apply-sets): declarative units gated by require_marker / skip_if_marker / require_os, each carrying [[mutate_xml]] (XML edits), [[systemd_dropin]] (linux user drop-ins), a restart_service (systemctl / brew services) with before/after hooks, and/or [[run]] inline shell (with require_command) for imperative bits. Files apply sorted by name — use numeric prefixes (10-, 20-).
  • Hooks: executables in backup.d/ run before the file sync; both hooks and [[run]] scripts receive a MACKUP_* environment contract (MACKUP_ROLE, MACKUP_OS, MACKUP_ARCH, MACKUP_CONFIG_DIR, MACKUP_MARKERS_DIR, MACKUP_STATE_DIR, MACKUP_DCONF_BACKUP_DIR, ...).

Requires Python 3.12+.

Why did you do this

Yesterday, I had a talk with Zach Zaro, complaining about the pain it is to reconfigure our Macbook each time we get a new one or install from scratch. That's a talk we have already had months ago.

I change my workstation every X months. Each time I either lose my apps' configurations, or I just waste a bunch of hours getting setup like I was on my old box. I also spend a lot of time reconfiguring the same stuff again on all my workstations (home, work).

Boring...

Some people tried to solve the problem on the application layer, like Github's Boxen, but it solves a different problem, from my point of view. I don't spend a lot of time installing or downloading stuff. I spend time configuring it.

For years, I've used a personal shell script that was copying known config files into Subversion, Git or Dropbox, and linked them into my home. But I felt a lot of us had the same problem: Making a more generic tool could help others and I could get help from others to support more apps in the tool.

So here comes Mackup, the little tool that will sync all your application configs to Dropbox (or Google Drive, or anything).

And it's 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 0.12.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 mackup-ng 0.12.0
File Size Uploaded Provenance Actions
mackup_ng-0.12.0.tar.gz 176.9 kB Without provenance Details for mackup_ng-0.12.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for mackup-ng 0.12.0
File Interpreter ABI Platform Actions
mackup_ng-0.12.0-py3-none-any.whl Python 3 none any Details for mackup_ng-0.12.0-py3-none-any.whl

Total release size: 406.4 kB

Release files / mackup_ng-0.12.0.tar.gz

Download URL mackup_ng-0.12.0.tar.gz
Size 176.9 kB
Tags Source
SHA-256 checksum
How to use checksums
1124d2aefa0d9af221689c54c25a52d3ae365f32ec97264911073178ef98dad8
BLAKE2b-256 checksum
How to use checksums
53e75ea6f8aa3bd5f66c3261a68cdaa6c27c1ed0ef288b2b429b1d87590a268e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.6

Release files / mackup_ng-0.12.0-py3-none-any.whl

Download URL mackup_ng-0.12.0-py3-none-any.whl
Size 229.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c39a5b3caaf5a10bd2200ff499985faf9eb608aaef67e71d9a8a519c1c32c132
BLAKE2b-256 checksum
How to use checksums
1636306405974e1859c5677ee7360000605eb61b81f366269699f0e2e14ec7df
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.6

Security for mackup-ng 0.12.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.

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