home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   alt.os.linux      Getting to be as bloated as Windows!      107,822 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 106,503 of 107,822   
   bad sector to Carlos E.R.   
   Re: pushing my bash luck   
   20 Sep 24 19:59:33   
   
   From: forgetski@_INVALID.net   
      
   On 9/20/24 07:03, Carlos E.R. wrote:   
   > On 2024-09-19 14:18, bad sector wrote:   
   >>   
   >> I want to devise a shutdown cron script that will make a dated rsync   
   >> backup of any directory under a particular path that had been written   
   >> to during the session and then shut down.   
   >>   
   >> The rsync command itself would look something like   
   >>   
   >> rsync -ahcEWXd /x/trees-planted/ /x/trees-$date (format 2024-09-24-hr-m)   
   >>   
   >> The part that's over my head is for the script to know what directory   
   >> (under /x in this case) had been written to.   
   >>   
   >> Maybe there's a uti that already does this and I just have to invoke   
   >> IT with args in the script?   
   >   
   > Another method, easy to do, is to rsync the entire tree to a folder with   
   > a timestamp in the name, hardlinking to the previous backup. This is   
   > actually an incremental backup. The last backup contains only the new or   
   > modified files, and hard links to the intact files from yesterday copy.   
   > The last folder appears to contain everything.   
   >   
   >   
   > Basically:   
   >   
   > rsync $OPTIONS --link-dest=$PREVIOUS $WHAT $CURRENT   
      
      
   Sorry but I fell out of the sidecar in that turn and am eating weed in   
   the ditch.   
      
   1   
   Why hard links and not soft? I don't think I have ever done a hard link   
   except to some smartass' face.   
      
   2   
   Isn't a hard link an actual copy stored somewhere else that survives if   
   the original drops dead? If it's an actual copy it'll take half the   
   night (TeamGrp ssd's, half as fast as green wd spinners) just to get the   
   directory ready.   
      
   3   
   Is it  --link-dest=$PREVIOUS that creates the hard links (copies?) in   
   the target folder?   
      
   4   
   Whichever link is used, doesn't rsync remove that file if the new   
   (source) directory no longer has it? This would mess up my backup so I   
   would need to use a copy of my last backup and with #2 above that's now   
   two half nights before even getting started.   
      
   If /x is always the current and source, /y is the last backup made, the   
   new partly-hardlinks target will be /z?  Something like this?   
      
   rsync -ahcEWXd --link-dest="/y" "/z" "/x"   
      
   --- 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