Re: One way SSH connection and incremental/differential backup
Denis Corbin <[email protected]>
| Newsgroups | gmane.comp.sysutils.backup.dar.support |
|---|---|
| Organization | http://dar.linux.free.fr/ |
| Message-ID | <[email protected]> |
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 On 25/10/2019 00:45, Kamil Renczewski wrote: > Hello, Hello, > My current (rsync) based backup mechanism uses one-way SSH > connection. I Wonder if could make a switch to DAR and preserve the > one-way SSH connection restriction. first I'm not sure to understand what you mean by "one-way SSH connection" as ssh is always bidirectional (order/command in one way, output/result on the other way). I assume you mean that there is not ssh server on the storage host, so all ssh session must be launched from the honey (storage server) to flower (the host to backup). > > I've read dar_ad_ssh > (http://dar.linux.free.fr/doc/usage_notes.html#netcat_ssh), this > explains how to make a differential backup when connection from > backup/flower host to a storage/honey host is possible. My case is > a little different. My host that need to be backed up have no idea > of the storage/honey host. > > The problematic step for me is to execute (on the backup/flower > host): > > ssh honey dar_slave backup > todar < toslave & dar_slave has to run on the host where is located the archive of reference (honey), and has to be connected to dar by two pipes. *** first option: using pipes with ssh means using stdout and stdin of the command that is ran remotely. You could use these pipes for dar to exchange with dar_slave, but then you will have not pipe left for the resulting backup, which will have to be saved locally on flower. on honey: mkfifo todar toslave dar_slave -i toslave -o todar backup & ssh flower dar -c diff_linux -A - -S 10M -S 5M -p < todar > toslave scp flower:diff_linux.*.dar . && ssh flower rm diff_linux.*.dar here diff_linux is written where dar is run, thus on flower and this backup can be copied/moved to honey afterward. The ssh session carries the exchanges between dar_slave and dar, no more the generated archive as stated in the documentation you referred. *** second option: create an isolated catalogue of the archive of reference upload it to flower and use dar over ssh from honey referring this isolated catalogue on honey: dar -C cat_backup -A backup -z scp cat_backup.1.dar flower:/tmp ssh flower dar -c - -A /tmp/cat_backup | dar_xform -s 10M -S 5M -p - - diff_linux ssh flower rm /tmp/cat_backup.1.dar > > I am wondering if there is a way that I could modify this step so > it can be done only from storage/honey host. I would try option 2 which is simpler and probably more adapted to your need as you seem having a storage host that holds all the backups > > Kamil Renczewski > Regards, Denis -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEOzEprx3d76WjfYGPCDGwvQPYsYIFAl2zR5MACgkQCDGwvQPY sYKsYBAAqoQLN3a0JWRpVFSZ3YeFSSG5Ng7BRUALYeKJs4rhbwCVRDxCa6uZE+L8 tIAN6WVF728s0X/vORsSvtkQg8/eQWDBs+RjQb/bZbsPtz6VZPsVsJpVpH7YZCuH P5XicUMsGUptUbmPDDvFdbBxagTQCwuSiFT7nRjqzO9ldniuQmkbNdNklc0hjKAP Y5nQkEQOq+b2PsvU5NVn3tfzn5/tTxduHwG4giWC02dPNv/7baRkFHZzhmkbDf3A z6aRMdFlm9Hb8ASH5eZ+yl+KZlRX/OXy9b0uG65xyqe2TaFjeJWemKyuATOAZJJi 1e2Km7VQF/jClqDKjA/aojwbLtN0CoPw++TfXbavWC0pSTImd8WjQQ6vHM4cgEdz ublYqy8laTWudUrDF97cxzk2vn4uERQtUe/m65oLYOONN5GLgfeHhPFridFDtFrm 3KVT73U3ejUQLGRM79ovEKm142HZPRdOg8rava9SPKM67OZc9Km1JmsulRdK8fV9 82hUYcziEF6DUpYxuG6uikPWKr29B3KmedYBNUi+lP8YHq3curJuLQRyg2YLeTCL t3m9Mj5BkRT5/9OGuM/9ldhIICozMY7khxJ8s2yxZg0GqUF+WZ1UWZd4pCCkOv/D 6O/oPA9seLKIDmNknXS5L/5TRVGLaBB65T9+UvGv964ooAH7uCw= =WItx -----END PGP SIGNATURE-----