Re: [Tails-dev] Feature #5301 - Clone or Backup Persistent V…

Poista viesti

Vastaa
Lähettäjä: Andrew Gallagher
Päiväys:  
Vastaanottaja: tails-dev
Aihe: Re: [Tails-dev] Feature #5301 - Clone or Backup Persistent Volume
Nobody interested?

To be clear, I'm willing to put in the work. I just don't want to spend
too much time on it if it isn't going to go anywhere.

Andrew.

On 03/12/15 12:51, Andrew Gallagher wrote:
> Hi, all.
>
> I've written a tool to clone the contents of a mounted persistent volume
> (or any other given directory tree) to a fresh or existing persistent
> volume on another tails drive. It was done as part of a pet project, but
> this functionality really belongs in tails itself.
>
> It consists of two parts: a perl wrapper that handles user prompts for
> passphrases etc. and a small setuid helper that performs the actual
> work. The setuid helper will create a partition/filesystem if necessary
> and then mounts, rsyncs and unmounts - this requires the passphrase to
> be entered multiple times, so the perl wrapper prompts for one itself
> and uses expect to supply it to the helper.
>
> There are currently two main caveats. Firstly, the size of the tails
> primary partition is hardcoded in the helper. It should be possible to
> extract this instead from the output of parted, and is probably just a
> matter of spending an hour or two on it. The other one is that the
> wrapper depends on Term::Choose, which isn't packaged in either tails or
> debian. I solved this by aliening a perl-term-choose deb but don't want
> to be responsible for it, so the user interface really should be rebuilt
> (suggestions welcome!). Of course it would probably be best if it could
> be integrated into the tails installer instead... ;-)
>
> You can find the code here:
>
> https://github.com/andrewgdotcom/frith/tree/master/src/tcp-helper.c
> https://github.com/andrewgdotcom/frith/tree/master/bin/tails-clone-persistent
>
> perl-term-choose can be found here:
>
> https://andrewg.com/debian/pool/main/p/perl-term-choose/perl-term-choose_1.202.0-2-abg2_all.deb
>
> Let me know if you think it is useful.
>
> Andrew.