Use tar to append?

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

 



I have a backup script which I run on some sort of regular
basis. I use tar to create an archive, which I then split
into pieces of CDROM size (703MB) and write to CDROMs.

Originally, I wrote it such that it added directories one
by one to the archive, but found that it took inordinately
long periods of time. A little investigation showed that
each time it started up tar, the entire archive got copied,
another directory got added, and then the archive was renamed.

Since there are about 15 directories that I back up, that
meant *lots* of copying.

So, now I just put them all in there at once. But I'm missing
the progress indicators I used to get. For example, during
the "verification phase" I used to have...

for path in $backupdirs
do
    echo "Verifying $path...." | wall
    tar tzf /tmp/backup.tar.gz 1>/dev/null && \
        echo "$path: verified" | wall || \
        echo "$path: errors in verify" | wall
    if [ $? -eq 0 ]
        then echo "$path: verified"
        else echo "$path: error(s) in verify" 1>&2
    fi
done

Is there a way to get tar to use the archive it is adding to
"in place"? I've read man and info, and I see --append
(which is what I was using) and --catenate (which looks
marginally faster, perhaps, since I compress), but see
no way to make it "just do it" without doing an implicit
copy.

Mike
--
p="p=%c%s%c;main(){printf(p,34,p,34);}";main(){printf(p,34,p,34);}
Oppose globalization and One World Governments like the UN.
This message made from 100% recycled bits.
You have found the bank of Larn.
I can explain it for you, but I can't understand it for you.
I speak only for myself, and I am unanimous in that!

[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux