All Projects → nachoparker → btrfs-sync

nachoparker / btrfs-sync

Licence: GPL-3.0 license
Smart and easy sync of BTRFS snapshots, locally or through SSH

Programming Languages

shell
77523 projects

Projects that are alternatives of or similar to btrfs-sync

triple-buffer
Implementation of triple buffering in Rust
Stars: ✭ 66 (+3.13%)
Mutual labels:  synchronization
buttervolume
BTRFS Volume plugin for Docker
Stars: ✭ 53 (-17.19%)
Mutual labels:  btrfs
old-audiosync
First implementation of the audio synchronization feature for Vidify, now obsolete
Stars: ✭ 16 (-75%)
Mutual labels:  synchronization
in2publish core
in2publish Community Version
Stars: ✭ 38 (-40.62%)
Mutual labels:  synchronization
libfmp
libfmp - Python package for teaching and learning Fundamentals of Music Processing (FMP)
Stars: ✭ 71 (+10.94%)
Mutual labels:  synchronization
dcs-tools
Tools for making remote Linux node management easy
Stars: ✭ 34 (-46.87%)
Mutual labels:  btrfs
mine
Share application state across computers using Dropbox.
Stars: ✭ 14 (-78.12%)
Mutual labels:  synchronization
sync-mht
Synchronize directory hierarchies using Hash-Tree's
Stars: ✭ 21 (-67.19%)
Mutual labels:  synchronization
syncdir
Automatically discover peers and synchronize a folder
Stars: ✭ 30 (-53.12%)
Mutual labels:  synchronization
nextcloud-grauphel
Tomboy note synchronization REST server nextcloud app
Stars: ✭ 53 (-17.19%)
Mutual labels:  synchronization
AsyncLock
An async/await-friendly lock for .NET, complete with asynchronous waits, safe reëntrance, and more.
Stars: ✭ 106 (+65.63%)
Mutual labels:  synchronization
SilentNotes
SilentNotes is a simple note taking app which respects your privacy.
Stars: ✭ 98 (+53.13%)
Mutual labels:  synchronization
awesome-immutable
A list of resources for people who want to investigate image-based Linux desktops
Stars: ✭ 184 (+187.5%)
Mutual labels:  btrfs
AudioAlign
Audio Synchronization and Analysis Tool
Stars: ✭ 80 (+25%)
Mutual labels:  synchronization
TAOMP
《多处理器编程的艺术》一书中的示例代码实现,带有注释与单元测试
Stars: ✭ 39 (-39.06%)
Mutual labels:  synchronization
retrygroup
Package retrygroup provides synchronization, Context cancelation for groups of retry goroutines working on subtasks of a common task.
Stars: ✭ 18 (-71.87%)
Mutual labels:  synchronization
btrfs-borg
btrfs-borg makes snapshots and backs up a btrfs snapshotted subvolumes and LXC containers using Borg
Stars: ✭ 22 (-65.62%)
Mutual labels:  btrfs
sync-client
SyncProxy javascript client with support for all major embedded databases (IndexedDB, SQLite, WebSQL, LokiJS...)
Stars: ✭ 30 (-53.12%)
Mutual labels:  synchronization
syncwatch
Browser extension to watch videos together
Stars: ✭ 48 (-25%)
Mutual labels:  synchronization
JFileSync3
File Syncing with encryption and compression (partly) compatible with encfs / boxcryptor (classic) volumes for local folders and WebDAV backends. Based on JFileSync - hence the name.
Stars: ✭ 20 (-68.75%)
Mutual labels:  synchronization

btrfs-sync

Smart and easy sync of BTRFS snapshots, locally or through SSH.

Example

Can be used in conjunction with btrfs-snp

# btrfs-sync --verbose --delete /home/user/.snapshots user@server:/media/USBdrive/home-snapshots
* Skip existing '/home/user/.snapshots/monthly_2018-01-09_200102'
* Skip existing '/home/user/.snapshots/monthly_2018-02-08_200102'
* Skip existing '/home/user/.snapshots/weekly_2018-02-09_140102'
* Skip existing '/home/user/.snapshots/weekly_2018-02-16_150102'
* Skip existing '/home/user/.snapshots/weekly_2018-02-23_150102'
* Skip existing '/home/user/.snapshots/weekly_2018-03-02_180102'
* Skip existing '/home/user/.snapshots/daily_2018-03-03_000101'
* Skip existing '/home/user/.snapshots/daily_2018-03-04_080101'
* Skip existing '/home/user/.snapshots/daily_2018-03-05_100102'
* Skip existing '/home/user/.snapshots/daily_2018-03-06_100102'
* Skip existing '/home/user/.snapshots/daily_2018-03-07_110102'
* Synchronizing '/home/user/.snapshots/hourly_2018-03-08_090101' using seed '.snapshots/hourly_2018-03-07_090101'...
time elapsed [0:00:24] | rate [11.1MiB/s] | total size [ 132MiB]
* Synchronizing '/home/user/.snapshots/hourly_2018-03-08_100101' using seed '.snapshots/hourly_2018-03-09_090101'...
time elapsed [0:01:05] | rate [11.1MiB/s] | total size [ 275MiB]
* Deleting non existent snapshots...
Delete subvolume (no-commit): '/media/USBdrive/home-snapshots/hourly_2018-03-08_090101'
Delete subvolume (no-commit): '/media/USBdrive/home-snapshots/hourly_2018-03-08_100101'

Features

  • Simple syntax
  • Progress indication
  • Support for xz or pbzip2 compression in order to save bandwidth.
  • Retention policy
  • Automatic incremental synchronization
  • Cron friendly

Usage

The syntax is similar to that of scp

Usage:
  btrfs-sync [options] <src> [<src>...] [[user@]host:]<dir>

  -k|--keep NUM     keep only last <NUM> sync'ed snapshots
  -d|--delete       delete snapshots in <dst> that don't exist in <src>
  -z|--xz           use xz     compression. Saves bandwidth, but uses one CPU
  -Z|--pbzip2       use pbzip2 compression. Saves bandwidth, but uses all CPUs
  -q|--quiet        don't display progress
  -v|--verbose      display more information
  -h|--help         show usage

<src> can either be a single snapshot, or a folder containing snapshots
<user> requires privileged permissions at <host> for the 'btrfs' command

Examples

Manual

Synchronize snapshots of home to a USB drive

# btrfs-sync /home/user/.snapshots /media/USBdrive/home-snapshots

Synchronize snapshots of home to a USB drive in another machine

# btrfs-sync /home/user/.snapshots user@server:/media/USBdrive/home-snapshots

Synchronize one snapshot of home to a USB drive in another machine

# btrfs-sync /home/user/.snapshots/monthly_2018-02-08_200102 user@server:/media/USBdrive/home-snapshots

Synchronize only monthly snapshots of home to a USB drive in another machine

# btrfs-sync /home/user/.snapshots/monthly_* user@server:/media/USBdrive/home-snapshots

Cron

Daily synchronization over the internet, keep only last 50

cat > /etc/cron.daily/btrfs-sync <<EOF
#!/bin/bash
/usr/local/sbin/btrfs-sync --quiet --keep 50 --xz /home user@host:/path/to/snaps
EOF
chmod +x /etc/cron.daily/btrfs-sync

Daily synchronization in LAN, mirror snapshot directory

cat > /etc/cron.daily/btrfs-sync <<EOF
#!/bin/bash
/usr/local/sbin/btrfs-sync --quiet --delete /home user@host:/path/to/snaps
EOF
chmod +x /etc/cron.daily/btrfs-sync

More at ownyourbits.com

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].