This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | Next revision Both sides next revision | ||
other:win10apps [2021/04/17 20:31] jypeter [rsync (Linux !)] Added examples |
other:win10apps [2021/04/19 12:14] jypeter [rsync (Linux !)] Added warnings |
||
---|---|---|---|
Line 145: | Line 145: | ||
<WRAP center round important 60%> | <WRAP center round important 60%> | ||
- | **Warning!** It's easy to lose files with ''rsync'' if you use the wrong syntax or options! Be sure to understand the basic options, and use ''%%--%%dry-run'' (simulate what would be done) and ''-v'' (verbose) before performing an actual synchronization | + | **Warning!** It's easy to lose files with ''rsync'' if you use the wrong syntax or options! |
+ | |||
+ | * Be sure to understand the basic options, and use ''%%--%%dry-run'' (simulate what would be done) and ''-v'' (verbose) before performing an actual synchronization | ||
+ | * <wrap em>Having a trailing ''/'' or not behind a directory name makes a difference!</wrap> | ||
Use ''man rsync'' for more options and details... | Use ''man rsync'' for more options and details... | ||
Line 184: | Line 187: | ||
* We have an existing //source// ''/mnt/h/test/'' directory that we would like to //mirror// to another disk or //destination//, as ''/mnt/i/test/''.\\ i.e we want to recursively copy the content of ''test/'' to a ''test/'' directory //somewhere else// | * We have an existing //source// ''/mnt/h/test/'' directory that we would like to //mirror// to another disk or //destination//, as ''/mnt/i/test/''.\\ i.e we want to recursively copy the content of ''test/'' to a ''test/'' directory //somewhere else// | ||
- | * Show what would be done, but do not do it (yet)\\ ''rsync %%--%%dry-run -avW -C /mnt/h/test/ /mnt/i/test'' | + | * Show what would be done, but do not do it (yet)\\ <wrap em>Note that we have a trailing ''/'' after the source directory, and no ''/'' after the destination directory</wrap>\\''rsync %%--%%dry-run -avW -C /mnt/h/test/ /mnt/i/test'' |
* Note: using ''-C'' makes sure that files and directories considered as temporary will not be copied. Maybe you don't want to use this! | * Note: using ''-C'' makes sure that files and directories considered as temporary will not be copied. Maybe you don't want to use this! | ||
* Same as above, without the //verbose// mode. Probably nothing will be displayed on the screen\\ ''rsync %%--%%dry-run -aW -C /mnt/h/test/ /mnt/i/test'' | * Same as above, without the //verbose// mode. Probably nothing will be displayed on the screen\\ ''rsync %%--%%dry-run -aW -C /mnt/h/test/ /mnt/i/test'' |