How can the --backup-dir be set to remote machine?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

How can the --backup-dir be set to remote machine?

jupiter.hce
Hi,

I am running rsync backup on Centos 6, the following command does not seem work, the /backup/fll_copy was fine, but the /backup/Wednesday in the remote machine was not created even I changed the source contents several times.


rsync -e "ssh -q -o StrictHostKeyChecking=no" --backup --backup-dir=username@ipaddress:/backup/$(date +%A) -av $SRC username@ipaddress:/backup/full_copy

Appreciate what I could be missing here?

Thank you.

Kind regards,

- j

--
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
Reply | Threaded
Open this post in threaded view
|

Re: How can the --backup-dir be set to remote machine?

Kevin Korb
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

The backup dir is relative to the target dir so if the target is
remote so is the backup dir.

On 02/03/2016 12:11 AM, jupiter wrote:

> Hi,
>
> I am running rsync backup on Centos 6, the following command does
> not seem work, the /backup/fll_copy was fine, but the
> /backup/Wednesday in the remote machine was not created even I
> changed the source contents several times.
>
>
> rsync -e "ssh -q -o StrictHostKeyChecking=no" --backup
> --backup-dir=username@ipaddress:/backup/$(date +%A) -av $SRC
> username@ipaddress:/backup/full_copy
>
> Appreciate what I could be missing here?
>
> Thank you.
>
> Kind regards,
>
> - j
>
>

- --
~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,
        Kevin Korb Phone:    (407) 252-6853
        Systems Administrator Internet:
        FutureQuest, Inc. [hidden email]  (work)
        Orlando, Florida [hidden email] (personal)
        Web page: http://www.sanitarium.net/
        PGP public key available on web site.
~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iEYEARECAAYFAlaxm0YACgkQVKC1jlbQAQeggACg3A43tzbL1sI+HwAT5PrdjZMe
WPAAn3LMnaDtu77RP1+R4S64EaJdIc/z
=QqZq
-----END PGP SIGNATURE-----

--
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html