procmail
[Top] [All Lists]

Re: Why is softlink / hardlink "BOGUS" ?

1996-05-26 10:06:26
On Sun, 26 May 1996, Stephen J. Turnbull wrote:

[some stuff that I deleted]


I never read the original message, but let me throw in my 2 cents worth:

        1)      Why Procmail might want to refuse writing to files
                with more than one links to them

        I'd guess 'cause even if a locking-file reflecting that file-
        name is created, the other link's name won't be protected by
        a locking file.

        2)      Best backup method?

        I use the same method regardless of if it's just a few files
        or every file in my box I backup. And the backups are so good
        that I can boot off them, if I have a boot-floppy handy. See,
        I backup to a removable hard-disk. [Very handy when upgrading
        Your OS, as I just did. I was able to run my old OS on the
        backup disc until the new was tip-top, and I just continued
        from the new.]

        I use a file list on standard input of cpio, in pass-through
        mode, since I backup to a hard disk. But You would probably
        be backupping to a disc file or tape. That would look like
        this: (Actually used on another Linux-system I administer)
              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

---------------------------------------------------------------------------
#!/usr/bin/bash
#
#       bu2nftape               by DATA LEGE Leif Erlingsson
#
#       Don't forget running `mt -f /dev/nrft0 rew' first!
#
find /bin /boot /etc /home /lib /root /sbin /tmp /var /usr /dev /vmlinuz 
/vmlinuz-1.2.13 -depth | cpio -oacv | gzip -c -9 > /dev/nrft0
#
#
#       Restore using
#
#               cd /; gzip -d -c < /dev/nrft0 | cpio -idcm              don't 
overwrite newer, or
#
#               cd /; gzip -d -c < /dev/nrft0 | cpio -idcmu             
unconditional copy.
#
#                                       # -B set I/O block size to 5120 bytes.
#                                       # -d create needed dir's.
#                                       # -u unconditional copy.
#                                       # -m keep modification dates.
#                                       # -p run in copy-pass mode.
#                                       # -a restore read-dates.
---------------------------------------------------------------------------

        This is how I archive my edits to the sendmail configuration tree
        on the systems I administer:

---------------------------------------------------------------------------
#!/bin/sh

find . -type f -print | egrep 
'gw|hpux|bsdi2.0.m4|RCS|elijah|rsv|proto.m4|linux|dispatch|mailertable' | cpio 
-oacv | gzip -c -9 > /tmp/rsv-mc-cpio-idcm.gz

echo  /tmp/rsv-mc-cpio-idcm.gz  saved
echo  List archive using the command
echo  zcat /tmp/rsv-mc-cpio-idcm.gz \| cpio -ict
echo  Unpack archive using the command
echo  zcat /tmp/rsv-mc-cpio-idcm.gz \| cpio -idcm
---------------------------------------------------------------------------

        And this is how I backup my Linux system, to a third harddisk:

---------------------------------------------------------------------------
#!/usr/bin/bash
#
mount /bu_linux
#       Create a backup-directory:
#
#       (/vmlinuz is copied first to get low inode numbers, meaning it
#       gets placed near the beginning of the partition, so the partition
#       is bootable even if most part of the partition is above the 500M
#       BIOS limit.)
#
#       (Chance can give us even lower inode numbers when /vmlinuz* and
#       /System.map* is copied last -- experience shows this -- but who
#       wants to gamble on that?)
#
cd /
find /vmlinuz* /System.map* /bin /boot /etc /home /lib /ql /root /sbin /tmp 
/var /usr /dev -depth | egrep -v '\/\.netscape-cache' | cpio -pdmua /bu_linux
#                                       # -B set I/O block size to 5120 bytes.
#                                       # -d create needed dir's.
#                                       # -u unconditional copy.
#                                       # -m keep modification dates.
#                                       # -p run in copy-pass mode.
#                                       # -a restore read-dates.
df
umount /bu_linux
---------------------------------------------------------------------------

        And this how I backup my msdos system to a partition on a third 
harddisk:

---------------------------------------------------------------------------
#!/usr/bin/bash
#
mount /bu_msdos
#       Create a backup-directory:
cd /msdos
find `/bin/ls -1 | egrep -v 
'^pub$|^wina20.386$|^386spart.par$|^opt$|^lost\+found$'` -depth | cpio -pdum 
/bu_msdos
#                                       # -B set I/O block size to 5120 bytes.
#                                       # -d create needed dir's.
#                                       # -u unconditional copy.
#                                       # -m keep modification dates.
#                                       # -p run in copy-pass mode.
#                                       # -a restore read-dates.
df
umount /bu_msdos
---------------------------------------------------------------------------

        This last example uses /bin/ls -1 to generate a `flat' list of
        files, and egrep -v to remove some elements from that list,
        and find to recurse below every element not removed, to pipe
        that into cpio.

        I like cpio best on the systems that support it, BSD Unix often
        does not, because it preserves EVERY TYPE of file system data -
        including device files etc. It is unbeaten! I use it instead of
        cp every time I copy more than half a dozen files.

        I unly use tar when I don't know that the recipient system
        has a good cpio, or when I know for sure it makes no differnce.


-- Leif Erlingsson, http://www.geocities.com/RodeoDrive/1998, +46 8 604 0995

<Prev in Thread] Current Thread [Next in Thread>