What do you get when you combine "tools" with "utils"? A silly redundant name.
Tootils is a suite of handy utilities (currently one) for Linux and Windows (using Bash through MSYS2/Cygwin/MinGW/Git Bash or, the way cool kids call it, MinSYS2CygBash for Lara Croft Windowed).
MacOS? Undefined behavior.
- Backup:
rsyncwrapper that takes a path and creates a mirror in your configured backups drive.
You can also configure a list of paths and back them all up in a single command. - DotLink: [planned] to be a tracked dotfiles symlinker.
Back-up logic avoids accidentally deleting files by ensuring the source directory argument does not contain a trailing slash (infamous rsync trap), and by creating a subdirectory in the destination.
Tootils also has pretty output. :) Apart from its glorious elegance, it will show the external command that it runs.
Optional .ttignore list to skip files/sub-directories.
Tootils creates a configuration file in $XDG_CONFIG_HOME/tootils, or ~/.config/tootils if XDG is unset.
Use this configuration to select your backups drive. Use a full path, in which a TootilsBackups sub-dir will be created.
rsync for the backup functionality.
readlink, mkdir, cp, cygpath (Windows only).
That's it, the rest are Bash built-ins.
This part should be improved for noobs
- clone the repo
chmod +x ttif on Linux- either add it to your $PATH or make an alias with
path/to/Tootils/tt
tt <subcommand> [arg]
- Use
tt bk <dir>to make a mirror backup of a directory in your configured drive. Only it will show a dry run for you to check before running, so you should then: - Use
tt bkg <dir>to actually execute said backup. (gfor go) - Use
tt backto read your list of configured directories and back them up. (dry run) - Use
tt backgto confirm and execute a full list backup. - Oh, right! You can add a
.ttignorefile at the root of your source directory. Any patterns listed in that file will be completely ignored byrsync.
Tootils will create these files in your config location:
tootils.conf. For global variables. Currentlybackup_root. Set it to a full path to your backups destination (i.e./e,/mnt/backups).backup.conf. A list of source directories to be backed up by thebacksubcommand. Full path on each line. You can skip directories by commenting them (start the line with#).
This is a draft of a README. The utility will use tt help to display all of this in a higher quality way.
Although now that I wrote this, it's kind of cool.
The actual tt script acts as a generic dispatcher for arbitrary subcommands. It's easy to add functionality now.