Skip to content
k4j8 edited this page Jan 22, 2023 · 6 revisions

FAQ

How is filetailor different than Chezmoi?

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.

How is filetailor different than Dotbot?

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.

What YAML do I need to sync a file between two machines?

In the YAML below, .bashrc will copy to ~/.bashrc on both machine1 and machine2.

device machine1:
device machine2:

file my_bashrc:
  path: ~/.bashrc

How do I use variables?

In 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 folder 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$

How do I create a group of devices?

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_1

What are these .ftbak files?

When 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: True

How do I change where filetailor.ini is saved?

Before 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/.

Why are my tabs getting deleted?

For both single-line and multi-line controls, tab characters will get converted to spaces. If this affects you, please create an issue.

Why does sync/restore show no changes, but backing up does?

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_A

Synced 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.

How do I completely uninstall filetailor?

First, backup any files or YAML you want to keep. To completely uninstall filetailor, run filetailor uninstall to remove folders and then pip uninstall filetailor to remove the program itself. Then, if you want, search your system for .ftbak files and delete them.