help-tar
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Help-tar] Incremental rename of folders


From: Kai Stian Olstad
Subject: [Help-tar] Incremental rename of folders
Date: Mon, 20 Jul 2015 14:56:19 +0200
User-agent: Roundcube Webmail/1.1.2

Hi

I'm trying to use tar incremental to synchronise Ubuntu apt repository created by apt-mirror on to a isolated network.

The first thing I did was to rsync the files to a usb and then from usb to destination. Since this two folder now is in sync I ran tar to /dev/null to create the snar file.

  tar -c -g /var/lib/tar/snar/ubuntu.snar /data/ubuntu -f /dev/null .

After that apt-mirror was executed followed by the tar like so

  apt-mirror
tar -c -g /var/lib/tar/snar/ubuntu.snar /data/ubuntu -f /data/backup/ubuntu.<seqnr>.tar .


I then tried extracting the tar files on the destination server in the correct sequence with

  tar -Gx -f /data/backup/ubuntu.<seqnr>.tar -C /data/ubuntu

The tar's did not contained a lot of changes but the extraction work fine.


I then did a massive cleanup(removed old unsupported versions) on the source server. apt-mirror do this by creating a clean.sh files the removes the old files and folders. clean.sh does not do anything other than a rm -f on files and rmdir on empty folders.
This script removes about 300 GB and several hundred files.

After I ran the tar command as before and the extraction on the destination server, but that gave some errors.

  tar -Gx -f /data/backup/ubuntu.8.tar -C /data/ubuntu
tar: Cannot rename ‘./no.archive.ubuntu.com/ubuntu/pool/main/c/compiz-fusion-plugins-main’ to ‘./no.archive.ubuntu.com/ubuntu/dists/raring-updates/universe/i18n’: Directory not empty
  tar: Exiting with failure status due to previous errors
  The tar command failed, aborting.

Tried it ones more:

  tar -Gx -f /data/backup/ubuntu.8.tar -C /data/ubuntu
tar: Cannot rename ‘./no.archive.ubuntu.com/ubuntu/pool/main/c/compiz-fusion-plugins-main’ to ‘./no.archive.ubuntu.com/ubuntu/dists/raring-updates/universe/i18n’: No such file or directory
  tar: Exiting with failure status due to previous errors
  The tar command failed, aborting.

Added a verbose:

  tar -Gvx -f /data/backup/ubuntu.8.tar -C /data/ubuntu
  Extracting /data/backup/ubuntu.8.tar to /data/ubuntu
  ./
tar: Cannot rename ‘./no.archive.ubuntu.com/ubuntu/pool/main/c/compiz-fusion-plugins-main’ to ‘./no.archive.ubuntu.com/ubuntu/dists/raring-updates/universe/i18n’: No such file or directory


I tried to list the content of the tar and I get this
tar --list --incremental --verbose --verbose -f ubuntu.8.tar | head -n 64

  drwxr-xr-x root/root      3072 2015-07-06 07:08 ./
  D apt.puppetlabs.com
  D archive.canonical.com
  D deb.opera.com
  D debian.neo4j.org
  D download.virtualbox.org
  D get.docker.com
  N ikke_legg_noe_her_det_vil_bli_slettet
  D linux.dell.com
  D no.archive.ubuntu.com
  D packages.vmware.com
  D ppa.launchpad.net
  D repo.mongodb.org
  D ubuntu_sin_flash
R ./no.archive.ubuntu.com/ubuntu/pool/main/c/compiz-fusion-plugins-main
  T ./no.archive.ubuntu.com/ubuntu/dists/raring-updates/universe/i18n
  R ./archive.canonical.com/dists/oneiric/partner
  T ./no.archive.ubuntu.com/ubuntu/dists/lucid
  R ./no.archive.ubuntu.com/ubuntu/dists/lucid/binary-amd64
  T ./no.archive.ubuntu.com/ubuntu/dists/lucid/main
  R ./no.archive.ubuntu.com/ubuntu/pool/main/c/cluster-agents
  T ./no.archive.ubuntu.com/ubuntu/dists/raring-security/universe/i18n
  R ./archive.canonical.com/dists/natty
T ./no.archive.ubuntu.com/ubuntu/dists/lucid-updates/main/dist-upgrader-all/current
  R ./no.archive.ubuntu.com/ubuntu/pool/main/c/couchdb
  T ./no.archive.ubuntu.com/ubuntu/dists/raring-proposed/main
  R ./no.archive.ubuntu.com/ubuntu/pool/main/c/cobbler-enlist
  T ./no.archive.ubuntu.com/ubuntu/dists/raring-updates/multiverse/i18n
  R ./no.archive.ubuntu.com/ubuntu/pool/main/c/clientcookie
  T ./no.archive.ubuntu.com/ubuntu/dists/raring-security/universe
  R ./no.archive.ubuntu.com/ubuntu/pool/main/c/compiz-fusion-bcop
  T ./no.archive.ubuntu.com/ubuntu/dists/raring-updates/universe
  R ./no.archive.ubuntu.com/ubuntu/pool/main/c/clutk
  T ./no.archive.ubuntu.com/ubuntu/dists/raring-updates/main/i18n
R ./no.archive.ubuntu.com/ubuntu/dists/oneiric-updates/restricted/binary-amd64
  T ./no.archive.ubuntu.com/ubuntu/dists/lucid/multiverse
  R ./no.archive.ubuntu.com/ubuntu/pool/main/c/cacao-source
  T ./no.archive.ubuntu.com/ubuntu/dists/raring-security/multiverse/i18n
  R ./no.archive.ubuntu.com/ubuntu/pool/main/c/cacao
  T ./no.archive.ubuntu.com/ubuntu/dists/raring-security/restricted
  R ./no.archive.ubuntu.com/ubuntu/pool/main/c/c3p0
  T ./no.archive.ubuntu.com/ubuntu/dists/raring-security/multiverse
  R ./no.archive.ubuntu.com/ubuntu/pool/main/c/commons-daemon
  T ./no.archive.ubuntu.com/ubuntu/dists/raring-updates/restricted/i18n
  R ./no.archive.ubuntu.com/ubuntu/pool/main/b/byacc
  T ./no.archive.ubuntu.com/ubuntu/dists/raring-security/main/i18n
R ./no.archive.ubuntu.com/ubuntu/dists/lucid-updates/main/dist-upgrader-all/current/partner/binary-i386
  T ./no.archive.ubuntu.com/ubuntu/dists/lucid/main/i18n
  R ./no.archive.ubuntu.com/ubuntu/pool/main/b/bootchart
  T ./no.archive.ubuntu.com/ubuntu/dists/raring-security/main
  R ./no.archive.ubuntu.com/ubuntu/pool/main/c/couchdb-glib
  T ./no.archive.ubuntu.com/ubuntu/dists/raring-proposed
R ./no.archive.ubuntu.com/ubuntu/dists/oneiric-updates/restricted/binary-i386
  T ./no.archive.ubuntu.com/ubuntu/dists/lucid/multiverse/i18n
  R ./no.archive.ubuntu.com/ubuntu/pool/main/c/cantor
  T ./no.archive.ubuntu.com/ubuntu/dists/raring-security/restricted/i18n
  R ./no.archive.ubuntu.com/ubuntu/pool/main/c/commons-beanutils
  T ./no.archive.ubuntu.com/ubuntu/dists/raring-updates/restricted
  R ./no.archive.ubuntu.com/ubuntu/pool/main/c/clutter-gtk-0.10
  T ./no.archive.ubuntu.com/ubuntu/dists/raring-updates/multiverse

  drwxr-xr-x root/root        14 2013-04-30 14:37 ./apt.puppetlabs.com/
  D dists
  D pool

Source server:
  RedHat 6.6
  tar 1.23

Destination server:
  Ubuntu 14.04
  tar 1.27.1

Does anyone understand why tar tries to rename folders when the clean.sh does not do anything more than rm and rmdir?
Any help with this would be appreciated.

--
Kai Stian Olstad



reply via email to

[Prev in Thread] Current Thread [Next in Thread]