All Projects → txn2 → irsync

txn2 / irsync

Licence: MIT license
rsync on interval, via command line binary or docker container. Server and IOT builds for pull or push based device content management.

Programming Languages

go
31211 projects - #10 most used programming language
Dockerfile
14818 projects

Projects that are alternatives of or similar to irsync

Elkarbackup
Open source backup solution for your network
Stars: ✭ 247 (+1200%)
Mutual labels:  backup, rsync
planb
PlanB - automating remote backups and snapshots with zfs/rsync
Stars: ✭ 24 (+26.32%)
Mutual labels:  backup, rsync
Edizon
💡 A homebrew save management, editing tool and memory trainer for Horizon (Nintendo Switch)
Stars: ✭ 706 (+3615.79%)
Mutual labels:  homebrew, backup
System Tar And Restore
Backup and Restore your system using tar or Transfer it with rsync
Stars: ✭ 170 (+794.74%)
Mutual labels:  backup, rsync
adlibre-backup
High performance rsync backup utilising BTRFS / ZFS filesystem features
Stars: ✭ 35 (+84.21%)
Mutual labels:  backup, rsync
Rsnapshot
a tool for backing up your data using rsync (if you want to get help, use https://lists.sourceforge.net/lists/listinfo/rsnapshot-discuss)
Stars: ✭ 2,335 (+12189.47%)
Mutual labels:  backup, rsync
sicksync
Don’t accept the available as the preferable. Go the extra mile with extra speed.
Stars: ✭ 67 (+252.63%)
Mutual labels:  backup, rsync
Hactar
📃 An incremential daily backup script using rsync
Stars: ✭ 34 (+78.95%)
Mutual labels:  backup, rsync
time-travel
An rsync based backup script which only transfers modified files. Smooth integration into OSX Notification Center.
Stars: ✭ 43 (+126.32%)
Mutual labels:  backup, rsync
cqfd
cqfd helps running commands inside the Docker container configured for your project, keeping the user and working directory the same inside the container
Stars: ✭ 48 (+152.63%)
Mutual labels:  docker-container, configuration-management
Rsync Incremental Backup
Configurable bash script to send incremental backups of your data to a local or remote target
Stars: ✭ 150 (+689.47%)
Mutual labels:  backup, rsync
btrfs-backup
A simple, flexible script for versioned backups using btrfs and rsync
Stars: ✭ 59 (+210.53%)
Mutual labels:  backup, rsync
Restic Backup Docker
A docker container to automate backups with restic
Stars: ✭ 142 (+647.37%)
Mutual labels:  backup, docker-container
Rsync Time Backup
Time Machine style backup with rsync.
Stars: ✭ 2,572 (+13436.84%)
Mutual labels:  backup, rsync
Backintime
Back In Time - A simple backup tool for Linux
Stars: ✭ 1,066 (+5510.53%)
Mutual labels:  backup, rsync
Dotfiles
Get started with your own dotfiles.
Stars: ✭ 1,094 (+5657.89%)
Mutual labels:  homebrew, backup
Rsyncosx
A macOS GUI for rsync
Stars: ✭ 780 (+4005.26%)
Mutual labels:  backup, rsync
Bash Toolkit
Este proyecto esá destinado a ayudar a los sysadmin
Stars: ✭ 13 (-31.58%)
Mutual labels:  backup, configuration-management
docker-ps3netsrv
Alpine based docker image for ps3netsrv (with arm compatibility). Built with the latest ps3netsrv binaries from aldostools (built from master), latest = ps3netsrv v20220813, edge = ps3netsrv v20220813
Stars: ✭ 55 (+189.47%)
Mutual labels:  homebrew, docker-container
BaNG
Backup Next Generation for Linux & Mac using rsync (support hardlinks and btrfs snapshots), Web-Frontend, Statistics, History-Merger)
Stars: ✭ 28 (+47.37%)
Mutual labels:  backup, rsync

irsync: interval rsync

irsync Release FOSSA Status Maintainability Go Report Card

Interval rsync

Source: https://github.com/txn2/irsync

Command line utility and Docker container for running rsync on an interval. rsync, synchronizes (one way) files between two sources, irsync wrapps rsync and runs it on a specified interval.

As a basic command-line utility, the only requirement is rsync. As a Docker container the conly requirement is Docker. The docker container size with all the requirements is only around 5 megs.

Background

I wrote up a little background on the motivation behind irsync on my imti.co blog, rSync Files on Interval.

Demo

Setup a quick demo using Dockers docker-compose command. Included with this project is a docker-compose.yaml with a simple client/server setup. In this composer configuration irsync is set to check the server every 30 seconds (after sync is complete. The server mounts the ./data/source directory and the client mounts the ./data/dest directory. Drop files in ./data/source and see them appear in ./data/dest.

Watch a 2 minute youtube video demoing the commands below

Setup and run demo (requires Docker):

# create a source and dest directories (mounted from the docker-compose)
mkdir -p ./data/source
mkdir -p ./data/dest

# make a couple of sample files
touch ./data/source/test1.txt
touch ./data/source/test2.txt

# get the docker-compose.yml
curl https://raw.githubusercontent.com/txn2/irsync/master/docker-compose.yml >docker-compose.yml

# run docker-compose in the background (-d flag)
docker-compose up -d

# view logs
docker-compose logs -f

# drop some more files in the ./data/source directory
# irsync is configured to check every 30 seconds in this demo.

#### Cleanup

# stop containers
docker-compose stop

# remove containers
docker-compose rm

Run on MacOS

Install

brew tap txn2/homebrew-tap
brew install irsync

Update (when new versions are released)

brew upgrade irsync

Run Prints the rsync version every 5 seconds.

irsync --irsync-interval-seconds=5 --version 

Adjust the interval to your requirement and add rsync flags as you normally would.

Run From Source

Example #1 Local with interval defaults

go run ./irsync.go -pvrt --exclude='custom' --exclude='special.txt' --delete ./data/source/ ./data/dest/

Run From Container

Example #1 Local

docker run --rm -v "$(pwd)"/data:/data txn2/irsync \
    -pvrt --delete /data/source/ /data/dest/

Example #2 Local Every 10 Seconds

docker run --rm -v "$(pwd)"/data:/data txn2/irsync \
    --irsync-interval-seconds=10 \
    -pvrt --delete /data/source/ /data/dest/

Example #3 Server to Local - Restart on Failure

docker run -d --name irsync-demo --restart on-failure \
    -v "$(pwd)"/data:/data txn2/irsync \
    --irsync-interval-seconds=10 \
    -pvrt --delete /data/source/ /data/dest/

Example#4: Custom container

Create Dockerfile:

FROM txn2/irsync:2.0.0
LABEL vendor="mk.imti.co"
LABEL co.imti.mk.source="https://github.com/txn2/irsync"

# if the rsync server requires a password
ENV RSYNC_PASSWORD=password

# exampe: keep local synchronized with server
# interval default: --irsync-interval-seconds=120
# activity timout default: --irsync-timeout-seconds=7200
CMD ["-pvrt", "--modify-window=30", "--delete", "--exclude='fun'", "rsync://[email protected]:873/data/", "/media"]

Build:

docker build -t custom-sync .

Run:

docker run -d --name custom-sync --restart on-failure \
    -v "$(pwd)"/data:/data custom-sync

Logs:

docker logs -f custom-sync

Environment Configuration

  • RSYNC_PASSWORD=password Use environment variable RSYNC_PASSWORD to keep from being prompted for a password for servers requiring authentication.

Development

Building and Releasing

Interval rsync uses GORELEASER to build binaries and Docker containers.

Test Release Steps

Install GORELEASER with brew (MacOS):

brew install goreleaser/tap/goreleaser

Build without releasing:

goreleaser --skip-publish --rm-dist --skip-validate

Release Steps

  • Commit latest changes
  • Tag a version git tag -a v2.0 -m "Version 2.0"
  • Push tag git push origin v2.0
  • Run: GITHUB_TOKEN=$GITHUB_TOKEN goreleaser --rm-dist

Resources

License

FOSSA Status

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].