vos: preserve cloneId and backupId when restoring
Preserve the volume clone and backup ids in the volume header when
restoring over an existing volume, instead of always setting the clone
and backup ids to zero.
For example, before this change, restoring over a volume resets the
ROnly and Backup ids reported in the volume header section of vos
examine.
$ vos examine xyzzy
xyzzy
536871023 RW 3 K On-line
myhost /vicepa
RWrite
536871023 ROnly
536871024 Backup
536871025
...
RWrite:
536871023 ROnly:
536871024 Backup:
536871025
number of sites -> 2
server myhost partition /vicepa RW Site
server myhost partition /vicepa RO Site
$ cat /tmp/xyzzy.dump | vos restore myhost a xyzzy -overwrite incremental
Restoring volume xyzzy Id
536871023 on server myhost partition /vicepa .. done
Restored volume xyzzy on myhost /vicepa
$ vos examine xyzzy
xyzzy
536871023 RW 3 K On-line
myhost /vicepa
RWrite
536871023 ROnly 0 Backup 0
...
RWrite:
536871023 ROnly:
536871024 Backup:
536871025
number of sites -> 2
server myhost partition /vicepa RW Site
server myhost partition /vicepa RO Site
Reviewed-on: http://gerrit.openafs.org/11516
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Daria Brashear <shadow@your-file-system.com>
(cherry picked from commit
7266685a03b12ca03c247623e7ffdc054a017382)
Change-Id: Iad0ef8f2d3fa1ef87b87bcbf9f74735ede1c2140
Reviewed-on: http://gerrit.openafs.org/12082
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>