I want to use the drush rsync
command to transfer files from a remote server to the local Drush, using the Drush dump-directory on both servers. In my mind it would look something like this:
$ drush rsync @remote$dump-dir/drup.sql.gz $dump-dir/drup.sql.gz
Because of limitations at my host I can't drush dump remote mysql directly. Instead I'll be dumping locally on the remote server, then using drush rsync
to transfer the dumps to a safe (non-web accessible) directory.
I could use regular rsync but I am trying to make a bash script for a variety of host directory trees. The drush dump-directory seems ideal for this, because:
- every drush site has one,
- it's already outside of the public web directory (/web, /www, etc),
- advanced users can reconfigure the dump-dir in .drushrc as needed.
I understand that Drush uses dump-dir for MySQL dumps. Is it also possible to command Drush to rsync files to that same directory?
The dump directory can be configured in drushrc like so:
$options['dump-dir'] = '/path/to/dumpdir';
How does this get reverse-engineered for command line?