README
¶
Pomati Sync Scripts
This directory contains utility scripts for synchronizing Pomati data and configuration between machines.
Scripts
pomatipull
Pull Pomati data and configuration from a remote host to your local machine.
Usage:
pomatipull [OPTIONS] <hostname>
Options:
-n, --dry-run- Preview changes without modifying files-q, --quiet- Suppress non-error output-h, --help- Display help message
Examples:
# Pull from a remote server
pomatipull myserver.local
# Preview what would be synced
pomatipull --dry-run 192.168.1.100
# Quiet mode
pomatipull --quiet workstation
pomatipush
Push Pomati data and configuration from your local machine to a remote host.
Usage:
pomatipush [OPTIONS] <hostname>
Options:
-n, --dry-run- Preview changes without modifying files-q, --quiet- Suppress non-error output-y, --yes- Skip confirmation prompt-h, --help- Display help message
Examples:
# Push to a remote server (with confirmation prompt)
pomatipush myserver.local
# Preview what would be synced
pomatipush --dry-run 192.168.1.100
# Skip confirmation prompt
pomatipush --yes backup-server
Prerequisites
- SSH Access: Both scripts require SSH access to the remote host
- SSH Key Authentication: For best results, set up SSH key-based authentication
- rsync: The
rsyncutility must be installed on both local and remote machines
Setting up SSH Keys
If you haven't set up SSH key authentication:
# Generate SSH key (if you don't have one)
ssh-keygen -t ed25519 -C "[email protected]"
# Copy key to remote host
ssh-copy-id username@hostname
How It Works
Both scripts use rsync with the --delete flag to ensure exact synchronization:
-
Synced directories:
~/.local/share/pomati/- Database and data files~/.config/pomati/- Configuration files
-
The
--deleteflag: Files in the destination that don't exist in the source will be removed. This ensures both locations are identical.
Safety Features
pomatipull
- Tests SSH connectivity before attempting sync
- Creates local directories if they don't exist
- Provides colored output for easy status monitoring
- Dry-run mode to preview changes
pomatipush
- Tests SSH connectivity before attempting sync
- Checks if local directories exist before pushing
- Confirmation prompt before syncing (can be skipped with
--yes) - Creates remote directories if they don't exist
- Dry-run mode to preview changes
- Continues even if config directory is missing
Common Use Cases
Initial Setup on a New Machine
Pull your existing Pomati data from your main machine:
pomatipull main-computer.local
Daily Sync Workflow
At the end of the day, push your work to a backup server:
pomatipush backup-server
At the start of the day, pull the latest data:
pomatipull backup-server
Preview Before Syncing
pomatipull --dry-run remote-host
pomatipush --dry-run remote-host
Troubleshooting
Connection Issues
If you see "Cannot connect via SSH":
- Verify the hostname is correct:
ping hostname - Test SSH manually:
ssh hostname - Check SSH key authentication:
ssh -v hostname
Permission Issues
If rsync fails with permission errors:
# Ensure directories have correct permissions on remote host
ssh hostname "chmod -R u+rwX ~/.local/share/pomati ~/.config/pomati"
Installation
To make these scripts available system-wide, you can add the scripts directory to your PATH:
Documentation
¶
There is no documentation for this package.