Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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).

share|improve this question

1 Answer 1

up vote 1 down vote accepted

Remove the --relative option.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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