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,645 of 138,051    |
|    Carlos E.R. to bad sector    |
|    Re: yardstick up my behind    |
|    24 Nov 22 21:27:19    |
   
   From: robin_listas@es.invalid   
      
   On 2022-11-24 20:48, bad sector wrote:   
   > On 11/23/22 19:42, Carlos E.R. wrote:   
   >> 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   
   >   
   >   
   > Thanks, interesting details, I saved them out. But like I said   
   > I'm still on training wheels and I never know beforehand what   
   > dev-name the target disk will be under. I just discovered why   
   > the target folder isn't shrinking to the size of the source,   
   > because the --delete option is not the same as -d   
      
   Doesn't matter.   
      
   Just edit the backup script just before running it every time, same as I do.   
      
   Consider the script like a memory aid.   
      
   --   
   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