A simple tool to back up and restore dot files (config files in Linux) for Linux OS.
- Specify backup structure in one or multiple config files.
- Back up the configured files to the directory of the config file.
- Restore the configured files from the directory of the config file.
- Environment Variable substitution in paths and names.
DotSave requires the JRE to be installed in your system to work. Check with your distro what is the best way to install it in your OS. After that just:
- Download the latest release.
- Unzip it.
- Add the directory to your
PATH
variable. - ???
- Profit!
-
First you need a place to put your backup:
mkdir ~/my-backup
-
Next you need to make a config file (for example
~/my-backup/apps.json
) in your favorite editor:{ "profiles": [ { "name": "neofetch", "root": "$HOME/.config/neofetch", "include": [ "config.conf" ] } ] }
Each
profile
will store all the files and directories specified ininclude
in the parent directory of the config file and the name of the profile. For example, the json above will store its profile in~/my-backup/neofetch
. Files and directories should preserve their owner and permissions. -
Now just execute the tool with the
-b
option to back up!dotsave -b ~/my-backup/apps.json
-
To restore, just use the
-r
option:dotsave -r ~/my-backup/apps.json
Tip
You can create a separate config file that backups files owned by root and use sudo
just with that config file!
This project is under the GNU GPL-3.0 license.
- If you have issues with DotSave, please open a bug report with as detailed information on how to reproduce the issue, and I'll try to fix it.
- If you wish to improve DotSave, please submit a PR with your changes and I will review them.
You can always buy me a coffee here: