Skip to main content

Backup and keep your application settings in sync (maintained fork of mackup).

Project description

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).

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 -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)

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.

Project details


Download files

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

Source Distribution

mackup_ng-0.11.1.tar.gz (156.8 kB view details)

Uploaded Source

Built Distribution

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

mackup_ng-0.11.1-py3-none-any.whl (217.1 kB view details)

Uploaded Python 3

File details

Details for the file mackup_ng-0.11.1.tar.gz.

File metadata

  • Download URL: mackup_ng-0.11.1.tar.gz
  • Upload date:
  • Size: 156.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.19 {"installer":{"name":"uv","version":"0.11.19","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}

File hashes

Hashes for mackup_ng-0.11.1.tar.gz
Algorithm Hash digest
SHA256 6c8729ccbe07d9e44860dff35bde55c7ae710db42f984a7f07eb612401f90ee0
MD5 f1d72bb71a49b8c206b4d67426a6dda3
BLAKE2b-256 2d373266b82b803eca1f1cffa1ee286cddd9adbe7931558de1b8aa48705bfccf

See more details on using hashes here.

File details

Details for the file mackup_ng-0.11.1-py3-none-any.whl.

File metadata

  • Download URL: mackup_ng-0.11.1-py3-none-any.whl
  • Upload date:
  • Size: 217.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.19 {"installer":{"name":"uv","version":"0.11.19","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}

File hashes

Hashes for mackup_ng-0.11.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c41811d20b5bef83d5973c4bb62d6caa625688fda95a5323ab91273ef9d120e5
MD5 3d5484fb8b7c580f12f2816fe73fc495
BLAKE2b-256 2d50f14eb00a1124de6240422c999cfa6851b2620fc1c614a58e671219f38c4d

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