Last active
September 7, 2020 11:06
-
-
Save a2ikm/e0ff1e8dc58b16b31b47 to your computer and use it in GitHub Desktop.
lsyncd + s3
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
s3sync = { | |
maxProcesses = 1, | |
onStartup = "aws s3 sync ^source ^target", | |
onCreate = "[ -f ^source^pathname ] && aws s3 cp ^source^pathname ^target^pathname || true", | |
onModify = "[ -f ^source^pathname ] && aws s3 cp ^source^pathname ^target^pathname || true", | |
onDelete = "[ -f ^source^pathname ] && aws s3 rm ^target^pathname || true", | |
onMove = "aws s3 mv ^target^o.pathname ^target^d.pathname", | |
} | |
sync { | |
s3sync, | |
source = "/path/to/source", | |
target = "s3://your-bucket-name/path/to/target", | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
fyi, there has been a documentation update with example: lsyncd/lsyncd#463