Would it work just as well to use escaped single-quotes?

```
system "vagrant ssh local -c 'cd /vagrant && mysqldump -u\'#{db_user}\' -p\'#{db_password}\' --opt --databases \'#{db_name}\' | gzip --rsyncable > #{backup_name}.gz'"
```