[cs615asa] ec2-backup

Jan Schaumann jschauma at stevens.edu
Wed May 9 16:29:08 EDT 2018


Yuan Ren <yren14 at stevens.edu> wrote:
 
> I am confused about the `-r command dir`. Is this directory also
> belongs to the remote host or just the using the remote command to
> backup the local directory?

No, 'dir' is always local.

'-r' does not specify the remote command to backup the local directory,
but a command to run on the remote site through which to filter the data
from the local system.

That is, if you ran

ec2-backup -r cat dir

then you would basically run

tar cf - <dir> | ssh ec2-instance "cat | dd of=/dev/sda3"

In contrast, if you used '-l':

ec2-backup -l cat dir

becomes:

tar cf - <dir> | cat | ssh ec2-instance "dd of=/dev/sda3"


If you ran

ec2-backup -r 'gpg -e -r 9BED3DD7' dir

then you would basically run

tar cf - <dir> | ssh ec2-instance "gpg -e -r 9BED3DD7 | dd of=/dev/sda3"

In contrast, if you used '-l':

ec2-backup -l 'gpg -e -r 9BED3DD7' dir

becomes

tar cf - <dir> | gpg -e -r 9BED3DD7 | ssh ec2-instance "dd of=/dev/sda3"


Note: you can provide both '-l' and '-r':

ec2-backup -l rot13 -r rot13 dir

becomes

tar cf - <dir> | rot13 | ssh ec2-instance "rot13 | dd of=/dev/sda3"


Hope this clarifies things.

-Jan


More information about the cs615asa mailing list