salt.states.rsync

Rsync state.

2016.3.0 新版功能.

salt.states.rsync.synchronized(name, source, delete=False, force=False, update=False, passwordfile=None, exclude=None, excludefrom=None, prepare=False)

Guarantees that the source directory is always copied to the target.

参数:
  • name -- Name of the target directory.
  • source -- Source directory.
  • prepare -- Create destination directory if it does not exists.
  • delete -- Delete extraneous files from the destination dirs (True or False)
  • force -- Force deletion of dirs even if not empty
  • update -- Skip files that are newer on the receiver (True or False)
  • passwordfile -- Read daemon-access password from the file (path)
  • exclude -- Exclude files, that matches pattern.
  • excludefrom -- Read exclude patterns from the file (path)
返回:

/opt/user-backups:
  rsync.synchronized:
    - source: /home
    - force: True