Hello!
I'm attempting to compare contents of files backed up with tar
with what's currently on the disk (mounted nfs volumes) but the tar fails
and I don't quite understand why.
The backup had been performed relative to the "/" directory.
The command (run as root) and beginning/end of its output:
Code:
tar -dvf backup_2020_09_29_0602.tar -C '/' >diff_backup_2020_09_29_0602
tar: nas/SRC/: Cannot savedir: Not a directory
tar: nas/SRC: Directory is new
tar: Skipping to next header
tar: nas/SRC/RPM/eclipse/: Cannot savedir: Not a directory
tar: nas/SRC/RPM/eclipse: Directory has been renamed from `nas/SRC'
tar: nas/SRC/RPM/svn/Subversion-1.6.2-1/: Cannot savedir: Not a directory
tar: nas/SRC/RPM/svn/Subversion-1.6.2-1: Directory has been renamed from `nas/SRC'
tar: Skipping to next header
.
.
.
tar: nas/SRC/eclipse/dvkit-1.1.0/p2/org.eclipse.equinox.p2.engine/profileRegistry/profile.profile/.data/o: Warning: Cannot stat: No such file or directory
tar: nas/SRC/eclipse/dvkit-1.1.0/p2/org.eclipse.equinox.p2.engine/profileRegistry/profile.profile/.data/o: Cannot savedir: Not a directory
tar: nas/SRC/eclipse/dvkit-1.1.0/p2/org.eclipse.equinox.p2.engine/profileRegistry/profile.profile/.data/o: Directory has been renamed from `nas/SRC'
tar: nas/SRC/eclipse/dvkit-1.1.0/p2/org.eclipse.equinox.p2.engine/profileRegistry/profile.profile/.data/o: Warning: Cannot stat: No such file or directory
tar: Skipping to next header
tar: nas/SRC/eclipse/dvkit-1.1.0/p2/org.eclipse.equinox.p2.repository/cache/: Cannot savedir: Not a directory
tar: nas/SRC/eclipse/dvkit-1.1.0/p2/org.eclipse.equinox.p2.repository/cache: Directory has been renamed from `nas/SRC'
tar: Exiting with failure status due to previous errors
\ls -l / | grep nas
drwxr-xr-x 6 root root 0 Oct 4 06:07 nas
\ls -l /nas | grep SRC
drwxrwxr-x 15 root users 4096 Jan 26 2020 SRC
The paths (short ones, at least) exist, I can see then with "ls".
There is one long path:
nas/SRC/eclipse/dvkit-1.1.0/p2/org.eclipse.equinox.p2.engine/profileRegistry/profile.profile/.data/o
which seems to be cut after the 99-th character. After reading about
the 99 characters default path limit I attempted to add the
--format=posix
switch but it didn't help.
But why the short paths can't be seen by "tar" I don't understand.
As I understand, if I use the "-C '/'" switch then the "tar" should treat
the path stored in the tar file as being relative to the "/".
What am I doing wrong?
TIA,
kaza.