2023-02-05 23:12:59 +01:00
|
|
|
#+options: toc:nil num:nil author:nil
|
|
|
|
|
|
|
|
** Copy multiple files, directories or disk using "rsync"
|
|
|
|
|
|
|
|
The command accepts arguments:
|
|
|
|
|
|
|
|
- "-r" recursive
|
|
|
|
- "-v" verbose
|
|
|
|
- "-a" archive (keeps info about files)
|
|
|
|
|
|
|
|
First use the source, then the destination
|
|
|
|
|
2023-07-04 15:23:52 +02:00
|
|
|
#+begin_example sh
|
2023-02-05 23:12:59 +01:00
|
|
|
rsync -rav /home/user/Documents /run/media/user/disk/backup/
|
2023-07-04 15:23:52 +02:00
|
|
|
#+end_example
|
2023-02-05 23:12:59 +01:00
|
|
|
|
|
|
|
~rsync~ can be also used with selective copyng based on file type
|
|
|
|
|
2023-07-04 15:23:52 +02:00
|
|
|
#+begin_example sh
|
2023-02-05 23:12:59 +01:00
|
|
|
rsync /home/user/Desktop/*.jpg /home/user/Desktop/backupdata/
|
2023-07-04 15:23:52 +02:00
|
|
|
#+end_example
|
2023-02-05 23:12:59 +01:00
|
|
|
|