Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm using tar for my incremental backup script on Oracle VM Server 3.2.2 and it comes with tar 1.15.1

I need this command:

tar -cf drive-C.full.tar --no-check-device \
    --listed-incremental=drive-C.full.snapshot drive-C/

But I get this error:

tar: unrecognized option `--no-check-device'


I'm doing incremental backups on VMs disks. I need the "no-check-device" because every time the vm disk .img file is mounted, the device numbers change and that messes up with tar's incremental backups.

Continues on: How to do incremental backup of .img files containing windows partition?

share|improve this question
Why do you need that option? – Nils Jun 7 '13 at 14:40
I see. So you mount the img-file of a windows-vm ("C"?) (BTW: how?) before you backup the files of the filesystem within that image? There might be other ways to do this (mounting and even incremental backup). – Nils Jun 7 '13 at 19:42
First I backup the hole .img file. On incremental backups I mount windows C partition mount /backup/win-vm/win-vm.img -o loop,offset=$(({STARTSECTOR * SECTOR_SIZE that I got from file and fdisk })) \ /backup/win-vm/drive-C and use tar with a level 1 snapshot file to get the changes. On an eventual restore, I'll just copy my base .img file and the level 1 tar archive. – GxFlint Jun 7 '13 at 19:55
up vote 3 down vote accepted

Oracle Linux, which is the base of Oracle VM is based on RHEL 5.

Another clone is CentOS 5. Current version: 5.8.

But: current tar-Version there is 1.15.1, too.

So if you want to get a newer version you have to compile it. For this you can include the CentOS-repositories into Oracle-Linux and install the needed compilation tools (gcc...).

OR try to get a way around using that "no-check-device" option.

Update 2013-06-07 about loopback-mounting:

Your problem with the changing major/minor propably arises because Oracle-VM itselv is dynamically using loopback-mounts by itselv. I would recommend the following steps:

  1. losetup your backup-image to a high-numbered loopback-device (like /dev/loop50)
  2. Do a kpartx -av on that device (this should give you a device for the Windows-C-partition)
  3. Mount that partition ro (propably with ntfs-utils or newer)
  4. Do your incementaly backup with tar or rsync.
  5. umount
  6. kpartx -dv
  7. release the loopback-device with losetup

I will provide further details when I am on a CentOS-box (including your repository-question).

share|improve this answer
Compiling never was easy with me, but I'll try. But I think that in the end I'll have to see what rsync can do for me. – GxFlint Jun 7 '13 at 19:35
@GustavoFSx rsync is one of the tools I would have advised to take a look at. It has a mode where it can rsync differences within a file - like your image. Or you could manually mount your image with always the same major/minor... – Nils Jun 7 '13 at 19:45
So, OVM doesn't come with the standard repositories. Witch one has the "build-essentials"? – GxFlint Jun 7 '13 at 19:47
@GustavoFSx I will update my answer with that information. While I was experimenting with OVM I used the standard-repos for CentOS 5 to install the snmpd. – Nils Jun 7 '13 at 20:08
I was able to set up the repo from here public-yum.oracle.com – GxFlint Jun 7 '13 at 20:22

Which hardware are you running this on Sparc or x86? I would guess that you're probably running Unbreakable Linux in which case you should be able to get an appropriate version of an RPM with x86 or Sparc.

Looking at this page would seem to indicate what I'm saying is correct, http://docs.oracle.com/cd/E26996_01/E18549/html/BABDDEGC.html. You also might want to just try running the command:

yum update tar

Oracle Unbreakable Linux is a derivative product from RHEL (Red Hat Enterprise Linux) so you should be able to install package built for CentOS (another deriviative product from RHEL). So long as it's the correct architecture.

share|improve this answer
Oracle VM Server 3.2.2 on x86_64 – GxFlint Jun 7 '13 at 13:59
So you should be able to either do a yum update tar or get the appropriate x86_64 RPM from a CentOS repository. I would just download the tar RPM and install it directly. – slm Jun 7 '13 at 14:03
Do you have the file /etc/redhat-release? If so what does it contain? – slm Jun 7 '13 at 14:04
This would be the appropriate RPM for a RHEL6 derivative distro: pkgs.org/centos-6-rhel-6/centos-rhel-x86_64/… – slm Jun 7 '13 at 14:06
/etc/redhat-release contains: Oracle VM server release 3.2.2 – GxFlint Jun 7 '13 at 14:14

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.