Go to file
Karel Zak ab02d87e4f sfdisk: add --backup and --backup-file
The option --backup force sfdisk to store *all* fragments of the
partition table (including MBR partition tables store in the
extended partitions) to

	$HOME/sfdisk-<devname>-<offset>.bak

The options -O, -backup-file <path> allows to override the default
path, but sfdisk still appends <devname>-<offset>.bak to the <path>.
The backup files always contain only raw data from the device, so it's
possible to use dd(1) to restore original data on the device.

The original sfdisk also supported -O <file>, but semantic was little
bit different:

   - all was based on 512-byte sectors
   - all sectors was stored to the one file in format
	  <offset>|<sector>|<offset>|...

this original concept makes the backup files specific to sfdisk and with
dependence on sector size.

The new concept is the same we already use for wipefs(8) backup files.

Example (disk with GPT):

   # sfdisk /dev/sda --backup

   Welcome to sfdisk (util-linux 2.25.202-f4deb-dirty).
   Changes will remain in memory only, until you decide to write them.
   Be careful before using the write command.

   Backup files:
          PMBR (offset     0, size   512): /root/sfdisk-sda-0x00000000.bak
    GPT Header (offset   512, size   512): /root/sfdisk-sda-0x00000200.bak
   GPT Entries (offset  1024, size 16384): /root/sfdisk-sda-0x00000400.bak

Signed-off-by: Karel Zak <kzak@redhat.com>
2014-10-07 14:55:32 +02:00
Documentation sfdisk: add deprecated --Linux 2014-10-07 14:55:32 +02:00
bash-completion Fix bash-completion Makemodule options 2014-08-11 14:52:04 +02:00
config build-sys: inform gtk-doc about __ul_attribute__ 2013-03-15 14:58:08 +01:00
disk-utils sfdisk: add --backup and --backup-file 2014-10-07 14:55:32 +02:00
include include/debug: remove duplicate 'const' declaration warning 2014-10-01 13:09:35 +02:00
lib textual: "ambivalent" applies to intentions, "ambiguous" to results 2014-10-01 09:37:03 +02:00
libblkid libblkid: zeroize errno on blkid_probe_get_buffer() success 2014-10-07 12:44:34 +02:00
libfdisk libfdisk: remove old label drives' API for parttypes 2014-10-07 14:55:32 +02:00
libmount libmount: fix mnt_is_readonly() #ifdef 2014-10-07 13:41:40 +02:00
libsmartcols textual: fix couple typos in comments 2014-10-01 12:33:15 +02:00
libuuid libuuid: remove _SVID_SOURCE pre-processor definition 2014-10-01 12:33:31 +02:00
login-utils textual: use usage() text element macros 2014-10-01 12:33:26 +02:00
m4 build-sys: improve the informative message when not building some util 2014-07-14 15:49:32 +02:00
misc-utils lsblk: fix compiler warning 2014-10-01 12:33:42 +02:00
po po: merge changes 2014-07-22 10:39:11 +02:00
schedutils textual: use manual tail usage() macro 2014-10-01 12:33:24 +02:00
sys-utils flock: zero timeout is valid 2014-10-07 12:12:39 +02:00
term-utils textual: use usage() text element macros 2014-10-01 12:33:26 +02:00
tests tests: add sfdisk test 2014-10-07 14:54:58 +02:00
text-utils textual: use usage() text element macros 2014-10-01 12:33:26 +02:00
tools build-sys: add libsmartcols to ko-release-gen script 2014-06-18 15:42:09 +02:00
.gitignore zrmactl: add new command to control /dev/zramN devices 2014-08-01 12:09:55 +02:00
.travis-functions.sh travis-ci: refactor and add .travis-functions.sh 2014-06-06 16:18:44 +02:00
.travis.yml travis: whitelist branches 2014-09-09 15:55:53 +02:00
AUTHORS docs: update AUTHORS file 2014-07-22 10:42:32 +02:00
COPYING docs: corrections to FSF license files, and postal address 2012-02-24 14:13:35 +01:00
ChangeLog build-sys: use AUTOMAKE_OPTIONS = gnu 2011-05-26 15:04:01 +02:00
Makefile.am build-sys: create parent directory for $(PATHFILES) 2014-09-03 09:50:24 +02:00
NEWS build-sys: release++ (v2.25) 2014-07-22 11:12:05 +02:00
README docs: update links to http://git.kernel.org/ web repository views 2013-11-12 11:47:57 +01:00
README.licensing COPYING: fix grammar of referring phrase, and indicate location better 2013-10-08 15:38:39 +02:00
autogen.sh build-sys: fix autopoint gettext version fun 2014-06-10 20:20:35 +02:00
configure.ac sfdisk: implement --list 2014-10-07 14:55:30 +02:00

README

                                  util-linux

              util-linux is a random collection of Linux utilities

     Note that in years 2006-2010 this project used the name "util-linux-ng".

MAILING LIST:

      E-MAIL: util-linux@vger.kernel.org
      URL:    http://vger.kernel.org/vger-lists.html#util-linux


DOWNLOAD:

      ftp://ftp.kernel.org/pub/linux/utils/util-linux/


SOURCE CODE:

      Web interface:
          http://git.kernel.org/cgit/utils/util-linux/util-linux.git
          https://github.com/karelzak/util-linux
      Checkout:
          git clone git://git.kernel.org/pub/scm/utils/util-linux/util-linux.git util-linux


NLS (PO TRANSLATIONS):

      PO files are maintained by:
          http://translationproject.org/domain/util-linux.html


VERSION SCHEMA:

      Standard releases:

          <major>.<minor>[.<maint>[.<bugfix>]]

             major = fatal and deep changes
             minor = typical release with new features
             maint = maintenance releases; bug fixes only
             bugfix = unplanned releases for critical/security bugs

      Development releases:

         <major>.<minor>-rc<N>