tar solution

tar solution

Post by Eric Smi » Fri, 14 May 1999 04:00:00



 Hi

 Much scouring of dejanews and poring over this simple shell script but no
 working backup solution.  I am looking for a basic tar routine that will do
 incremental backups, taking its input from `find'.  The latter uses a
 touched file from the previous execution instance to find changed files.

 Complication is that we need to filter out the /proc and /dev hierarchies -
 I choose to do this with a perl filter.

 Problems (that I know of)
 - we occasionally *on filenames with spaces.
 - the nst0 (non rewinding) mechanism does not seem to work well.
 - tape backs up "forever" - maybe a recursive link.

 What is better or fixes this:

 $1 can be `f' full or `i' incremental.

 #!/bin/bash

 case $1 in
 f)      find /  \! -type d -depth -print0|perl -pe \
's/\/proc\/.*\0//g;s/\0\/dev\/pty.*\0//g'|xargs -0 tar czf /dev/nst0
         touch /mirror/backuptimeformytar
         ;;

 i)      find / -newer /usr/local/bin/backuptimeformytar \! \
-type d -depth -print0|perl -pe 's/\/proc\/.*\0//g;s/\0\/dev\/pty.*\0//g'|\
xargs -0 tar cf /dev/nst0
         mt -f /dev/nst0 tell
         ;;
 *)      echo 'How about an argument like "f" for full backup or "i" '
         exit 1
         ;;
 esac

--
Eric Smith

Tel. 021 236 111

 
 
 

tar solution

Post by Leslie Mikese » Tue, 18 May 1999 04:00:00




> Much scouring of dejanews and poring over this simple shell script but no
> working backup solution.  I am looking for a basic tar routine that will do
> incremental backups, taking its input from `find'.  The latter uses a
> touched file from the previous execution instance to find changed files.

Why don't you use GNUtar with its --listed-incremental option to
do this correctly instead of using 'find' at all.  (Try renaming
a directory between the full and incremental and see what you get
after a restore of your find-generated tape).

Quote:> Complication is that we need to filter out the /proc and /dev hierarchies -
> I choose to do this with a perl filter.

I prefer to include /dev (GNUtar understands device entries) and
make each filesystem a separate run with the --one-file-system
option.  This also avoids problems with NFS, cdrom, or floppy mounts
accidentally being included.

Quote:> Problems (that I know of)
> - we occasionally *on filenames with spaces.

Letting tar recurse from '.' on its own avoids problems with this.

Quote:> - the nst0 (non rewinding) mechanism does not seem to work well.

That sounds like a system-specific problem.  

  Les Mikesell


 
 
 

1. Looking for .tar solution

-----BEGIN PGP SIGNED MESSAGE-----

Hi Y'all!

First, apologies if this question does not fit the group.
I've tried figuring out where to post my question, and this seems
to come closest.

I have looked through various FAQs, tried archie, WWW searchs etc.
- - no luck so far.

My problem:

I have come across some files, with the .tar extension, and they
seem to be a collection of files assembled into one.
I then tried out tar on my ISP account, but always got the
response: '/dev/rmt08 does not exist' or something to that extent.
I tried specifying another as per the man pages, but to no avail.

Now, what I would like the most, is a tar port for MS-DOS, so
that I wouldn't have to upload the files just to get them split up.
If this is not done, then how about a spec of the .tar format.
Last, how would I make tar work on my shell account?

Thanks, and if this subject doesn't fit here, emails are
OK as to not fill the group with an off-topic thread.

 Morten Frederiksen
~~~~~~~~~~~~~~~~~~~~

-----BEGIN PGP SIGNATURE-----
Version: 2.6.2i

iQCVAwUBMHau+ZHJIQHjyeydAQFY8AQAkbCeWU9lA3w+4g6+hcY02LUFVC5N4N/G
TExUDq6fSeqWzKVJkTWkRUbSqYXazXUAI/qQRAl4zI3gjzuuIiDC7NP5okA6SRDE
gBZM4xoCdXOJJFdDb3W56uTpvqMrBSysJnlFrDOQCnXlLo2qJITkzE3uwyUDYy6Z
uWIZ39kgx5I=
=dgMH
-----END PGP SIGNATURE-----

---
Beware of low-flying butterflies.
--
Visit my Homepage, http://login.dknet.dk/~mortenf

----------------------------------------------------------------------------
   PGP key ID: E3 C9 EC 9D - Send me your public key, finger me for mine!

2. motoral sm56 modem and linux

3. tar -xvf mozilla.tar = tar: directory checksum error

4. HPFS Filesystem...

5. Wanted: rcmd host tar x_?_vqf file.tar file1 ... fileN | tar xvf -

6. How exactly to get xdm going?

7. Tar File Too Large: Solutions?

8. Trying to Activate Modem

9. Solution for wu-ftpd compress AND tar

10. rpm src-tar mess... any good solutions?

11. Backup solution? Cpio/tar/rcp?

12. UNIX solution vs. NT solution for multi-user internet support?

13. IDE/ATAPI Zip Drive Mounting Solution (my solution)