Util-Linux package development
 help / color / mirror / Atom feed
* sfdisk: dump format changed in 2.26
@ 2015-11-19  9:28 Tzafrir Cohen
  2015-11-24 15:33 ` Karel Zak
  0 siblings, 1 reply; 2+ messages in thread
From: Tzafrir Cohen @ 2015-11-19  9:28 UTC (permalink / raw)
  To: util-linux

Hi,

Is dumping and restoring accross versions of sfdisk supported?

The sfdisk man page documents using --dump to dump partitions of a
system and later restore them by feeding them to sfdisk from the
standard input.

The format of this dump has changed in the rewrite in version 2.26, and
thus a dump generated by newer distributions cannot be used by existing
ones.

New versions seem to be able to use old dumps.

A simple script I use here to convert new format to old:

sed \
        -e 's/type=/Id=/' \
        -e '/^label:/d' \
        -e '/^label-id:/d' \
        -e '/^device:/d' \
        #

>From what I could see, "Id" was changed to "type" in the body and
various extra header lines were added. Al of those changes make the dump
file unreadable by older versions.

Is there any intention to support some sort of compatibility through an
extra option?

Asked originally on https://bugs.debian.org/805277

-- 
Tzafrir Cohen         | tzafrir@jabber.org | VIM is
http://tzafrir.org.il |                    | a Mutt's
tzafrir@cohens.org.il |                    |  best
tzafrir@debian.org    |                    | friend

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: sfdisk: dump format changed in 2.26
  2015-11-19  9:28 sfdisk: dump format changed in 2.26 Tzafrir Cohen
@ 2015-11-24 15:33 ` Karel Zak
  0 siblings, 0 replies; 2+ messages in thread
From: Karel Zak @ 2015-11-24 15:33 UTC (permalink / raw)
  To: Tzafrir Cohen; +Cc: util-linux

On Thu, Nov 19, 2015 at 10:28:28AM +0100, Tzafrir Cohen wrote:
> New versions seem to be able to use old dumps.

This has been the most important :-)

> A simple script I use here to convert new format to old:
> 
> sed \
>         -e 's/type=/Id=/' \
>         -e '/^label:/d' \
>         -e '/^label-id:/d' \
>         -e '/^device:/d' \
>         #
> 
> From what I could see, "Id" was changed to "type" in the body and
> various extra header lines were added. Al of those changes make the dump
> file unreadable by older versions.
> 
> Is there any intention to support some sort of compatibility through an
> extra option?

I'm not sure if we really need (and want) to provide compatibility in
this way. Maybe we can add the sed command to the man page.

    Karel

-- 
 Karel Zak  <kzak@redhat.com>
 http://karelzak.blogspot.com

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-11-24 15:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-19  9:28 sfdisk: dump format changed in 2.26 Tzafrir Cohen
2015-11-24 15:33 ` Karel Zak

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox