-
Couldn't load subscription status.
- Fork 0
FAQ
Chezmoi and filetailor both support adjusting files for device-specific variables, running scripts before/after sync, displaying the differences before syncing, and use actual files instead of symlinks. Chezmoi takes a template approach whereas filetailor uses comments within the file. Chezmoi is also much more mature.
Dotbot uses symbolic links to manage files whereas filetailor creates copies and allows diffs to be viewed before making changes. filetailor also allows for commenting and uncommenting files based on the machine it is being restored to.
Dotbot has a plugin ecosystem and can be installed as a Git submodule whereas filetailor should be installed with PyPI.
In the YAML below, .bashrc will copy to ~/.bashrc on both machine1 and machine2.
device machine1:
device machine2:
file my_bashrc:
path: ~/.bashrcIn the YAML below, the directory scripts will sync to /home/external_hdd/nextcloud/scripts/ on machine1 and to ~/nextcloud/scripts/ on machine2.
Additionally, all instances of $NEXTCLOUD$ in files within the scripts directory will be converted to /home/external_hdd/nextcloud when restoring to machine1 and to ~/nextcloud when restoring to machine2. When backing up the files, those same paths will be converted to $NEXTCLOUD$.
Variable names can be whatever you want, no special symbols required.
device machine1:
vars:
$NEXTCLOUD$: /home/external_hdd/nextcloud
device machine2:
vars:
$NEXTCLOUD$: ~/nextcloud
file scripts:
path: $NEXTCLOUD$/scripts/
vars:
- $NEXTCLOUD$The following YAML will replace all instances of device_group_1 in the YAML and file content with device1 device2 device3.
default:
vars:
device_group_1: device1 device2 device3
device device1:
device device2:
device device3:
file fileA:
include_devices: device_group_1When filetailor overwrites a local file via filetailor restore, a copy of the file is saved as <filename_with_extension>.ftbak before it is overwritten. If you do not want these files created, run filetailor with filetailor restore --no-bak or add the following YAML:
default:
no_bak: TrueBefore running filetailor init, edit config.ini in the source files. Uncomment and change the override_filetailor_ini_path to whatever location you like. If you installed with pip, config.ini will be at <virtualenv_name>/lib/<python_ver>/site-packages/filetailor/filetailor/data/.
For both single-line and multi-line controls, tab characters will get converted to spaces. If this affects you, please create an issue.
If a device has two variables equal to the same string, the program uses the first one listed, which may be different than the raw variable in the synced file. See example below. If this affects you, please create an issue.
device machine1:
file_only:
var1: value_A
var2: value_ASynced file:
var2
Local file:
value_A
Tailored file when backing up (doesn't match synced file):
var1
Sync will always show the same results as restore.
First, backup any files or YAML you want to keep. To completely uninstall filetailor, run filetailor uninstall to remove directories and then pip uninstall filetailor to remove the program itself. Then, if you want, search your system for .ftbak files and delete them.