Sync Operations

Sietch's sync capabilities allow you to transfer encrypted data between vaults - even when internet connectivity is unavailable or unreliable. This page explains the different sync methods and how to use them effectively.


Understanding Sync Methods

Sietch offers multiple ways to synchronize your vaults:

Direct TCP Sync

Fast and reliable vault synchronization over local networks or direct connections.

LibP2P Sync

More robust sync with NAT traversal for more complex network situations.

Sneakernet

Physical transfer of vault chunks via USB drives or other media - for airgapped machines or highly restricted networks.


Basic Sync Command

sietch sync

The core command for synchronizing your vault with peers.

Bash
$sietch sync --peer 192.168.1.42
Click to copy

Options:

OptionTypeDescription
--peerstringPeer address to sync with
--directionstringSync direction: pull, push, or both (default)
--resilientflagEnable resilient mode for unstable connections
--pathsstringSpecific paths to sync
--dry-runflagPreview sync without changes
Basic Sync
# Sync with a peer on the local network
sietch sync --peer 192.168.1.42
Pull Only
# Only download from peer, don't upload
sietch sync --peer 192.168.1.42 --direction pull
Selected Paths
# Only sync specific directories
sietch sync --peer 192.168.1.42 --paths /research/,/docs/
Sync operations are incremental - only missing or changed chunks are transferred, making subsequent syncs faster.

Finding Peers

sietch discover

Automatically find other Sietch vaults on the local network.

Bash
$sietch discover
Click to copy
  • Uses UDP broadcast messages to find peers
  • Works on local networks without internet
  • Shows vault IDs and IP addresses of discovered peers

Options:

OptionTypeDescription
--timeoutdurationHow long to search (default 5s)
--jsonflagOutput in JSON format

sietch peer

Manually manage known peers.

Add Peer
# Add a known peer
sietch peer add 192.168.1.42
List Peers
# List known peers
sietch peer list
Remove Peer
# Remove a peer
sietch peer remove 192.168.1.42

Trust is Critical


Offline Sync (Sneakernet)

For airgapped machines or censored networks, Sietch supports transferring data using physical media:

sietch export

Export vault chunks for offline transfer.

Bash
$sietch export --to /media/usb/sietch-chunks
Click to copy

Sync Strategies

Common Sync Patterns

Star Topology

One central vault syncs with multiple peers, creating a hub-and-spoke pattern.

# Run on the central vault
sietch peer list  # View all connected peers
sietch sync --all # Sync with all known peers

Mesh Network

Every vault syncs with multiple others, creating redundancy.

# Add multiple peers
sietch peer add 192.168.1.40
sietch peer add 192.168.1.41
sietch peer add 192.168.1.42

# Sync with each
sietch sync --peer 192.168.1.40
sietch sync --peer 192.168.1.41
sietch sync --peer 192.168.1.42

Checkpoint Sync

Periodic syncs on schedule to ensure data redundancy.

# In a cron job or scheduled task
sietch sync --peer 192.168.1.42 --paths /critical-data/

Advanced Sync Features

sietch sync-status

Check the sync status of your vault.

Bash
$sietch sync-status
Click to copy

This command shows:

  • Last successful sync time with each peer
  • Number of pending changes
  • Sync health metrics

sietch resolve-conflicts

Handle sync conflicts between vaults.

Bash
$sietch resolve-conflicts
Click to copy

How Conflict Resolution Works


Troubleshooting Sync Issues

  • Connection refused: Check if peer is running and accessible; verify IP addresses
  • Sync halts midway: Use --resilient flag for unstable connections
  • Permission denied: Check vault permissions
  • Encryption errors: Ensure both vaults have necessary encryption keys
Bash
$sietch diagnose-sync --peer 192.168.1.42
Click to copy

Next Steps:
Learn how the Security Model protects your data during sync operations.