1
0
Fork 0
mirror of https://github.com/Luzifer/s3sync.git synced 2024-12-20 11:31:17 +00:00
Small utility to sync local directories from/to Amazon S3 without installing any dependencies
Find a file
Knut Ahlers 7d76fc8a58
Update README
Signed-off-by: Knut Ahlers <knut@ahlers.me>
2023-06-09 17:16:54 +02:00
.github/workflows Breaking: Refactor, update deps, add MinIO support 2023-06-09 16:56:51 +02:00
pkg/fsprovider Breaking: Refactor, update deps, add MinIO support 2023-06-09 16:56:51 +02:00
.gitignore Vendor libraries 2016-01-04 22:54:12 +01:00
.golangci.yml Breaking: Refactor, update deps, add MinIO support 2023-06-09 16:56:51 +02:00
go.mod prepare release v2.0.0 2023-06-09 17:08:21 +02:00
go.sum Breaking: Refactor, update deps, add MinIO support 2023-06-09 16:56:51 +02:00
History.md prepare release v2.0.0 2023-06-09 17:08:21 +02:00
LICENSE prepare release v2.0.0 2023-06-09 17:08:21 +02:00
main.go prepare release v2.0.0 2023-06-09 17:08:21 +02:00
Makefile Breaking: Refactor, update deps, add MinIO support 2023-06-09 16:56:51 +02:00
README.md Update README 2023-06-09 17:16:54 +02:00

Luzifer / s3sync

s3sync is a small utility to sync local directories from/to Amazon S3 without installing any dependencies. Just put the binary somewhere into your path and set three ENV variables and your're ready to sync.

Features

  • Static binary, no dependencies required
  • Sync files only if required (judged by file size & modify-date)
  • Using multiple threads to upload the transfer is quite fast
  • Optionally delete files at target
  • Optionally make files public on sync (only if file needs sync)
  • Sync local-to-s3, s3-to-local, local-to-local or s3-to-s3

Usage

  1. Set AWS_ACCESS_KEY, AWS_SECRET_ACCESS_KEY and AWS_REGION
  2. Execute your sync
# s3sync --help
Usage of s3sync:
  -d, --delete             Delete files on remote not existing on local
      --endpoint string    Switch S3 endpoint (i.e. for MinIO compatibility)
      --log-level string   Log level (debug, info, warn, error, fatal) (default "info")
      --max-threads int    Use max N parallel threads for file sync (default 10)
  -P, --public             Make files public when syncing to S3
      --version            Prints current version and exits


# echo "ello" >test.txt
# echo "foobar" >test2.txt

# s3sync --delete ./ s3://test/
time="2023-06-09T17:15:09+02:00" level=info msg="transferred file" filename=test2.txt
time="2023-06-09T17:15:09+02:00" level=info msg="transferred file" filename=test.txt

# s3sync --delete ./ s3://test/

# touch test.txt
# rm test2.txt

# s3sync --delete ./ s3://test/
time="2023-06-09T17:15:29+02:00" level=info msg="deleted remote file" filename=test2.txt
time="2023-06-09T17:15:29+02:00" level=info msg="transferred file" filename=test.txt