Forums before death by AOL, social media and spammers... "We can't have nice things"
|    alt.os.linux.suse    |    Suse is actually not that bad    |    138,051 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 137,641 of 138,051    |
|    Carlos E.R. to bad sector    |
|    Re: yardstick up my behind    |
|    24 Nov 22 01:42:44    |
   
   From: robin_listas@es.invalid   
      
   On 2022-11-23 23:49, bad sector wrote:   
      
   > :-)   
   >   
   > where does it end?   
   >   
   > In this case I'm just trying to get rsync to do what I want it to do,   
   > scripts will come afterward if at all. I try never to have more than one   
   > backup disk plugged-in at the same time so sripting can have challenges,   
   > besides, a double command separated by semicolon on one line gives me   
   > all the time I need to get a good night's sleep without scripts.   
   >   
   > The problem here was that I didn't verify the mount before RETURN :-)   
      
   Well, doing it in a script is simple, and would check for the mount and   
   not fill your partition.   
      
   Scripting is very simple. Almost the same as typing. Then you run it,   
   and if it fails, you edit it again to correct the problem, and run it again.   
      
   #!/bin/bash   
      
   DEST=/0/s/a   
   SOURCE=/0/d/a/   
   OPTIONS="--archive --acls --xattrs --hard-links --sparse \   
    --stats --human-readable --one-file-system"   
      
      
   mount $DEST   
   MOUNT=`mount | grep $DEST`   
   if ! test -n "$MOUNT" ; then   
    echo "*** ERROR: could not mount, aborting"   
    echo   
    echo $MOUNT   
    exit   
   fi   
      
   rsync $OPTIONS \   
    --exclude=/lost+found --exclude=/dev --exclude=/sys \   
    --exclude=/proc --exclude=/run \   
    $SOURCE $DEST   
      
      
      
   Another version.   
      
      
   #!/bin/bash   
      
   OPTIONS="--archive --acls --xattrs --hard-links --sparse \   
    --stats --human-readable --one-file-system"   
      
   function DoTheThing()   
   {   
    SOURCE=$1   
    DEST=$2   
      
    mount $DEST   
    MOUNT=`mount | grep $DEST`   
    if ! test -n "$MOUNT" ; then   
    echo "*** ERROR: could not mount $DEST, aborting"   
    echo   
    echo $MOUNT   
    exit   
    fi   
      
    rsync $OPTIONS \   
    --exclude=/lost+found --exclude=/dev --exclude=/sys \   
    --exclude=/proc --exclude=/run \   
    $SOURCE $DEST   
   }   
      
      
      
   DoTheThing /0/d/a/ /0/s/a   
   DoTheThing /0/d/h/ /0/s/h   
      
      
      
      
   --   
   Cheers, Carlos.   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   
|
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca