Created
August 30, 2014 21:48
-
-
Save brianlow/e6168bfa2285c79463ce to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Copy logs from the vagrant share (hosted by Windows) to ~/logs | |
# This is because logstash tracks files using their inode number | |
# but this number may change each time the vm is booted. | |
# | |
# rsync options | |
# -r recursive | |
# -t transfer file mod times and use to skip files | |
# -v verbose | |
# --inplace update files rather than write new and rename | |
# --no-W force delta compression even though source+destination are local | |
# | |
* * * * * flock -n /home/vagrant/rsync-cron-job.lock -c 'echo "";echo "---";date;rsync -rtv --inplace --no-W /vagrant/logs/ /home/vagrant/logs/' >> /home/vagrant/rsync-cron-job.log 2>&1 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment