IT dragons tamed since 2006 (with 755 solutions and growing)

[login]
[join]

your IP[54.162.154.91]




If you thought this solution was helpfull, please login and vote. Not a member? click here

ID725
TitleDifferences between the rsync delete options
Byjohn
Keywordsrsync
Categorylinux
Votes0
Views98
Score98
Date2016-10-06
Body
Differences between the rsync delete options:

--del/--delete_during: Deletes files from the destination dir as they are copied (saves memory
compared to --delete-before: --delete-before makes a separate scan to look for deleteables) --delete: Deletes files in the destination directory if they don't exist in the source directory. --delete-before: Delete files in the destination directory before coping file-with-same-name from
source directory --delete-during: Delete files in the destination directory WHILE copying file-with-same-name from
source directory --delete-delay: Mark deletes during transfer, but wait until transfer is complete --delete-after: Receiver deletes after transfer, not before...If some other part of the rsync moved
extra files elsewhere, you'd want this instead of --delete-delay, because --delete-delay decides
what it's going to delete in the middle of transfer, whereas --delete-after checks the directory for
files that should be deleted AFTER everything is finished. --delete-excluded: Deletes files from the destination directory that are explicitly excluded from
transferring from the source directory. The point of rsync is not copying, it is archiving. This is an important distinction. Processing
deleted/changed files is critical, and in many cases nuanced. The --delete flag in particular is one I've seen screwed up many times. A lot of people use rsync to
move files to low priority storage, and in this case you want the files you're moving to still EXIST
in the destination directory. That's not what delete does: --delete makes sure that, when you delete
a file from the source directory, it is ALSO deleted from your destination directory, so your
destination doesn't get full of junk... Once saw a guy wipe out his backup by putting in a new
drive, and not turning off his nightly rsync script. Script saw that the source dir was now empty,
and it deleted every file in the destination dir, so they'd match. Most of the other options are space or performance related. When you delete the files is important
if you want to make sure the transfer is successful before you do anything, but if your device is
too small to handle 2 copies of all the information, you need to delete as you go, etc. It's a
little wacky because of it's long history across multiple platforms: some options have been added so
that people who were used to certain behavior wouldn't be confused.
SharediggDigg this solutiondel.icio.usPost to del.icio.usSlashdotSlashdot it!email to a friend
PrintPrint This Solution Print
If you thought this solution was helpfull, please login and vote. Not a member? click here


Latest News

Thanks to Dave for hosting this site!

Registered User Area

[login]
[new user]


Paying the Rent



Advanced Search:

Choose body, keywords, title, or all to include in search 
words to include in search 
and(+)

Choose body, keywords, title, or all to include in search 
additional words to include in search 
not(-)

Choose body, keywords, title, or all to exclude in search 
words to exclude from search 


catagory
order by






diggDigg Dracko
del.icio.usPost to del.icio.us
SlashdotSlashdot us!




Don't forget to vote!
Powered by John Core
Bye!

Dracko by John Core

me

View John Core's profile on LinkedIn


Certifications
security logo saber ccsa logo ccna-logo hbss veritas

Technologies
oracle_logo
solaris_logo linux-logo openstack_logo vbox_logo splunk storagetek_logo sun_logo oraclevm_logo brocade_logo bsd_logo

Languages
c-logo bash-logo php-logo

Employers
PlanetPayment Medecision AWi PennStateHershey DISA DLA cim Sun

Consulting
KMBS PNC FBI CCS PTD Sentinel