I want to sync remote database copy using command

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

As it's result command creates file /backup/snapshots/backup/databases/mysql.sql. How can I force it to put file in /backup/snapshots/mysql.sql? It's mandatory that source must be remote (it's part of more complex script).

link|improve this question

feedback

1 Answer

up vote 1 down vote accepted

Remove the --relative option.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.