esync

Directory watching and remote syncing
Log | Files | Refs | README | LICENSE

.esync.toml.example (4422B)


      1 # =============================================================================
      2 # esync configuration file
      3 # =============================================================================
      4 #
      5 # Copy this file to one of the following locations:
      6 #   ./esync.toml                      (project-local, highest priority)
      7 #   ~/.config/esync/config.toml       (user-level)
      8 #   /etc/esync/config.toml            (system-wide)
      9 #
     10 # esync searches these paths in order and uses the first one found.
     11 # You can also pass an explicit path with:  esync --config /path/to/config.toml
     12 #
     13 
     14 
     15 # -----------------------------------------------------------------------------
     16 # [sync]  --  Defines what to sync and where
     17 # -----------------------------------------------------------------------------
     18 [sync]
     19 
     20 # Local directory to watch and sync FROM.  (Required)
     21 local  = "."
     22 
     23 # Remote destination to sync TO.  (Required)
     24 # For remote targets use scp-style notation:  user@host:/path/to/dest
     25 # For local-to-local sync just use an absolute or relative path.
     26 remote = "user@host:/path/to/dest"
     27 
     28 # Polling interval in seconds for the file-system watcher.
     29 # Default: 1
     30 interval = 1
     31 
     32 
     33 # -----------------------------------------------------------------------------
     34 # [sync.ssh]  --  SSH connection settings (optional)
     35 # -----------------------------------------------------------------------------
     36 # Uncomment and configure this section if you need fine-grained control over
     37 # the SSH connection used for remote syncing.  When omitted, esync derives
     38 # SSH parameters from the remote string above.
     39 
     40 # [sync.ssh]
     41 # host             = "myserver.com"       # SSH hostname
     42 # user             = "deploy"             # SSH username
     43 # port             = 22                   # SSH port (default: 22)
     44 # identity_file    = "~/.ssh/id_ed25519"  # Path to private key
     45 # interactive_auth = false                # Enable keyboard-interactive / 2FA auth
     46 
     47 
     48 # -----------------------------------------------------------------------------
     49 # [settings]  --  General behaviour tunables
     50 # -----------------------------------------------------------------------------
     51 [settings]
     52 
     53 # Debounce delay in milliseconds for the file-system watcher.
     54 # Events within this window are coalesced into a single sync.
     55 # Default: 500
     56 watcher_debounce = 500
     57 
     58 # Whether to run a full sync immediately when `esync sync` starts,
     59 # before entering the watch loop.
     60 # Default: false
     61 initial_sync = false
     62 
     63 # Global ignore patterns.  Matched files/directories are excluded from
     64 # watching AND from rsync.  Patterns follow rsync's --exclude syntax.
     65 ignore = [".git", "node_modules", ".DS_Store"]
     66 
     67 
     68 # -----------------------------------------------------------------------------
     69 # [settings.rsync]  --  rsync-specific options
     70 # -----------------------------------------------------------------------------
     71 [settings.rsync]
     72 
     73 # Use rsync archive mode (-a): preserves symlinks, permissions, timestamps,
     74 # group, owner, and device files.
     75 # Default: true
     76 archive = true
     77 
     78 # Compress data during transfer (-z).
     79 # Default: true
     80 compress = true
     81 
     82 # Delete files on the remote that no longer exist locally (--delete).
     83 # This makes the remote an exact mirror of the local directory.
     84 # Default: false
     85 delete = false
     86 
     87 # Follow all symlinks and copy the files they point to (--copy-links).
     88 # When false, only symlinks pointing outside the source tree are dereferenced.
     89 # Default: false
     90 copy_links = false
     91 
     92 # Keep incremental backups of overwritten files on the remote.
     93 # Default: false
     94 backup = false
     95 
     96 # Directory (relative to the remote root) where backups are stored
     97 # when backup = true.
     98 # Default: ".rsync_backup"
     99 backup_dir = ".rsync_backup"
    100 
    101 # Show per-file transfer progress (--progress).
    102 # Default: true
    103 progress = true
    104 
    105 # Additional raw arguments passed directly to the rsync command.
    106 # Example: ["--delete", "--verbose"]
    107 extra_args = []
    108 
    109 # Extra rsync-only ignore patterns (appended after settings.ignore).
    110 # These are passed as --exclude flags to rsync but do NOT affect the
    111 # file-system watcher.
    112 ignore = []
    113 
    114 
    115 # -----------------------------------------------------------------------------
    116 # [settings.log]  --  Logging configuration
    117 # -----------------------------------------------------------------------------
    118 [settings.log]
    119 
    120 # Path to a log file.  When unset, logs go to stderr only.
    121 # file = "/var/log/esync.log"
    122 
    123 # Log format: "text" (human-readable) or "json".
    124 # Default: "text"
    125 format = "text"