rdiff-backup-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Backward compatibility of next beta


From: Frank Crawford
Subject: Re: Backward compatibility of next beta
Date: Mon, 03 Feb 2020 22:28:00 +1100
User-agent: Evolution 3.34.3 (3.34.3-1.fc31)

On Mon, 2020-02-03 at 22:03 +1100, Frank Crawford wrote:
...
> > For what I understood: the "--remote-schema" is the template for a
> > command that is popen()-ed.
> > 
> > If your server _and client_ have two executables for rdiff-backup, say:
> >  A) ~/rdiff-backup-old/rdiff-backup
> >  B) ~/rdiff-backup-new/rdiff-backup
> > 
> > What is the problem in having the client calling:
> > 
> >  1) ~/rdiff-backup-old/rdiff-backup --remote-schema 'ssh -C %s 
> > ~/rdiff-backup-old/rdiff-backup --server'
> > 
> > or:
> > 
> >  2) ~/rdiff-backup-new/rdiff-backup --remote-schema 'ssh -C %s 
> > ~/rdiff-backup-new/rdiff-backup --server'
> > 
> > The old version on the client would call the old version on the
> > server, and the new version on the client would call the new version
> > on the server.
> > 
> > What ``Old'' and ``new'' are, can be chosen with total freedom: stable
> > and beta? Python 2 and Python 3? Script and self-contained binary?
> > They would be completely independent, because the only common part
> > would be ssh transmitting their data.
> > 
> > This still requires to have the same versions of rdiff-backup on the
> > client and servers, but does not require an upgrade, in terms of the
> > new version _substituting_ the old. They could coexist side by side!
> > 
> > I hope I could explain myself more clearly now.
> 
> Ahh, yes, much clearer, and yes something along that line would work. 
> It is just a scripting exercise of some form to get it working.

Just thinking about it, it is even simpler than that, you only need two
versions on the central server, the rest can have either the new or old
version, so there is no need to change the name on the remote host.

You can do something like:

#!/bin/sh

remver=`ssh remhost rdiff-backup --version`
case "$remver" in
"rdiff-backup 2.*") exec rdiff-backup "$@" ;;
*) exec rdiff-backup-old "$@" ;;
esac


Frank




reply via email to

[Prev in Thread] Current Thread [Next in Thread]