From: Gordon@leaf.net.nz   
      
   On 2026-02-02, Dan Purgert wrote:   
   > On 2026-02-02, pinnerite wrote:   
   >> I rsync my main drive to backups.   
   >>   
   >> However I am a bit messy at filing documents, just keeping them in   
   >> temporary places, like "Downloads" for example. Eventually I Will   
   >> decide to create one or more directories and move stuff into them.   
   >>   
   >> When I backup of course, the new directories (and contents) will be   
   >> copied but the originals will remain on the backup drive. It would   
   >> time-consuming to go through the backup drive, work out what had been   
   >> duplicated and delete the original files.   
   >>   
   >> In the past, because I have multiple backups, I would delete all the   
   >> contents of a backup drive before backing up to it again.   
   >>   
   >> That though is time consuming and seems like using a hammer to crack a   
   >> nut.   
   >   
   > So use something like fdupes or the occasional --delete[*] switch with your   
   > rsync job?   
      
   If Alex just wants his backup (via rsync) to be idential to the scource   
   (directory) then, the --delete option will do it.   
      
   Do a test run on a sample directory, to see if you get what you are expecting.   
      
   --del an alias for --delete-during   
    --delete delete extraneous files from dest dirs   
    --delete-before receiver deletes before xfer, not during   
    --delete-during receiver deletes during the transfer   
    --delete-delay find deletions during, delete after   
    --delete-after receiver deletes after transfer, not during   
    --delete-excluded also delete excluded files from dest dirs   
      
      
   >   
   >   
   > [*] NB -- there are several 'options' you can use with --delete; such as   
   > 'before' or 'after' the transfer (and some additional variants thereto)   
      
   See above.   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   
|