Difference between revisions of "Rsync"

From DevOps Notebook
(Created page with "=== Copy files and directories and removed source with rsync === <pre> $ rsync --remove-source-files -rltv --progress /backup/fullbackup-20210524 /mnt/backup/2021/05/24/ </pre>")
 
Line 2: Line 2:
 
<pre>
 
<pre>
 
$ rsync --remove-source-files -rltv --progress /backup/fullbackup-20210524 /mnt/backup/2021/05/24/
 
$ rsync --remove-source-files -rltv --progress /backup/fullbackup-20210524 /mnt/backup/2021/05/24/
 +
</pre>
 +
 +
### Faster delete (then rm -r) of many small files with rsync ###
 +
<pre>
 +
mkdir empty_dir
 +
# rsync -a --delete empty_dir/    mydirfordeletion/
 
</pre>
 
</pre>

Revision as of 14:48, 25 October 2023

Copy files and directories and removed source with rsync

$ rsync --remove-source-files -rltv --progress /backup/fullbackup-20210524 /mnt/backup/2021/05/24/
      1. Faster delete (then rm -r) of many small files with rsync ###
mkdir empty_dir
# rsync -a --delete empty_dir/    mydirfordeletion/