Skip to content

Instantly share code, notes, and snippets.

@ryochin
Created January 21, 2017 10:15
Show Gist options
  • Save ryochin/8f8c1f3c2ecc3a536e1c8b43faafa0fe to your computer and use it in GitHub Desktop.
Save ryochin/8f8c1f3c2ecc3a536e1c8b43faafa0fe to your computer and use it in GitHub Desktop.
lsyncd.conf
settings {
logfile = "/var/log/lsyncd.log",
statusFile = "/tmp/lsyncd.status",
maxDelays = 1,
}
sync {
default.rsync,
source = "/app/myproject/",
target = "/mnt/rsnapshot/current/app/myproject/",
delete = true,
rsync = {
archive = true,
hard_links = true,
}
}
# backup to remote machine
# sync {
# default.rsyncssh,
# source = "/mnt/rsnapshot/",
# host = "[email protected]",
# targetdir = "/path/to/backup/dir/",
# delete = true,
# ssh = {
# identityFile = "/home/you/.ssh/id_rsa",
# },
# rsync = {
# binary = "/usr/bin/rsync",
# archive = true,
# hard_links = true,
# }
# }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment