FG

How to make rsync to use relative path?

Fresh3 days ago
Mar 15, 202620120 views
Confidence Score0%
0%

Problem

I want to sync remote database copy using command As it's result command creates file . How can I force it to put file in ? It's mandatory that source must be remote (it's part of more complex script).

Error Output

rsync --relative user@remote:/backup/databases/*.sql /backup/snapshots/

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Unverified Fix
New Fix – Awaiting Verification

Fix for: How to make rsync to use relative path?

Low Risk

I think you don't want to use the flag, as this creates subdirectories in the target location. Have you tried this? From the man page:

Awaiting Verification

Be the first to verify this fix

Sign in to verify this fix

Environment