Docs / Guides
Automatic snapshots
Let dkit back up your setup on a schedule, so you always have a recent backup if a PC dies or a change goes wrong.
PowerShell
dkit snapshot schedule # every day at 12:00, keep the last 7 (asks for a password once)
dkit snapshot schedule --every weekly --day fri --time 18:00 --keep 4 --folder D:\dkit-snapshots
dkit snapshot run # take one now
dkit snapshot list # snapshots, schedule, how the last run went
dkit snapshot unschedule [--forget-password] # turn it off (snapshots are kept)- What a snapshot is: an ordinary encrypted
.dkitbackup, exactly likedkit migrate export. Open one withdkit migrate inspect,compareorrestore, on any PC, with your password. - Pruning: only the newest
--keepsnapshots are kept. dkit only deletes files it named itself (snapshot-<pc>-<date>-<time>.dkit). - The password is kept in your OS's secure storage, so the job can run without asking:
- Windows: DPAPI (encrypted with your Windows login).
- macOS: your Keychain.
- Linux: your keyring through
secret-tool. On servers or WSL with no keyring, it goes in a file only your user can read, and dkit tells you. - It's never put on a command line.
- The schedule uses the OS's own scheduler, for your user only, with no admin rights:
- Windows: a Task Scheduler task "dkit snapshot". It runs hidden, and catches up after the PC was off.
- macOS: a launchd agent. It catches up after sleep.
- Linux: a marked line in your crontab.
- When the job fails, the result goes to
~/.dkit/snapshots.log, anddkit snapshot listshows it. - If you update Node.js or reinstall dkit, run
dkit snapshot scheduleagain so the job points at the new location.