Migrate from another tool
Moving to dotsync always takes the same three steps: make sure the real files are in place on one machine, dotsync add them there, then dotsync init every other machine. Use a new, empty repository for dotsync: its layout (manifest.json plus files/) is its own.
Your dotfiles are symlinks into a directory like ~/dotfiles. dotsync follows a symlinked target as long as the file it points to is inside your home directory, so you can start straight away. For a clean result that no longer depends on the old directory, replace the links with real files first:
-
Turn each link into a regular file:
Terminal window # Linux (GNU coreutils)for f in ~/.gitconfig ~/.zshrc; do cp --remove-destination "$(readlink -f "$f")" "$f"; done# macOSfor f in ~/.gitconfig ~/.zshrc; do src=$(readlink "$f"); rm "$f"; cp "$src" "$f"; doneFor a linked directory,
stow -D <package>removes the links; then copy the package’s files into place. -
dotsync init <new-url>, anddotsync addthe real paths. -
On every other machine, run
stow -Dfor the migrated packages, thendotsync init <new-url>.
Your home directory is a git work tree, managed by yadm or by git --git-dir=$HOME/.cfg --work-tree=$HOME. The files are already real files in place.
- On one machine,
dotsync init <new-url>anddotsync addeach file or directory you want managed. - On every other machine,
dotsync init <new-url>. - Once
dotsync statusshowsokeverywhere, retire the old setup: stop running yadm or your alias, and delete its repository (~/.local/share/yadm/repo.gitfor yadm,~/.cfgfor the bare-repository method). Your files stay where they are.
chezmoi renders files from a source directory into place, so the real files already exist.
- On one machine, run
chezmoi applyso the files are current, thendotsync init <new-url>anddotsync addthem. - Templated files render differently on each machine. Either pick one rendering and move the per-machine parts into local include files, or keep those files under chezmoi.
- On every other machine,
dotsync init <new-url>, then runchezmoi forgeton the migrated files so the two tools never manage the same file.
Mackup copies files to and from a folder in your cloud storage (mackup backup, mackup restore), or, in its older link mode, moves them there and links them back.
- Make sure your files are real files in place. In copy mode they already are; run
mackup restoreif this machine is behind. In link mode,mackup link uninstallcopies the files back and removes the links. dotsync init <new-url>, anddotsync addthe files you want.- On every other machine, do the same as step 1, then
dotsync init <new-url>, and stop running Mackup for the migrated files.
After migrating, run dotsync status on each machine: every entry should be ok.