Transfer Methods

Direct SCP/RSYNC: If source and target can communicate directly:

# Using SCP
scp postgres-backup-*.sql.gz user@target-host:/path/to/backups/
scp elasticsearch-backup-*.tar.gz user@target-host:/path/to/backups/
scp consul-backup-*.snap user@target-host:/path/to/backups/

# Using RSYNC (recommended for large files)
rsync -avz --progress postgres-backup-*.sql.gz user@target-host:/path/to/backups/
rsync -avz --progress elasticsearch-backup-*.tar.gz user@target-host:/path/to/backups/
rsync -avz --progress consul-backup-*.snap user@target-host:/path/to/backups/

Intermediate Storage: If direct transfer is not possible:

  1. Copy backups from source to intermediate storage (NAS, cloud storage)
  2. Download backups from intermediate storage to target
  3. Verify checksums to ensure integrity

Checksum Verification: Always verify file integrity after transfer:

# On source system
md5sum postgres-backup-*.sql.gz > checksums.txt
md5sum elasticsearch-backup-*.tar.gz >> checksums.txt
md5sum consul-backup-*.snap >> checksums.txt

# Transfer checksums.txt along with backups

# On target system
md5sum -c checksums.txt