Rsync command: Difference between revisions
From WikiMLT
m Spas moved page Команда: rsync scp to Rsync without leaving a redirect |
m Стадий: 1 [Фаза:Идентифициране, Статус:Създаване]; Категория:Linux Server |
||
Line 1: | Line 1: | ||
<noinclude><!--[[Category:Linux_Server|?]]-->{{ContentArticleHeader/Linux_Server}}</noinclude> | |||
== References == | |||
* ... | |||
* ... | |||
== Section 1 == | |||
... | |||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
# Синхронизиране на музика със SD карта... | # Синхронизиране на музика със SD карта... | ||
Line 15: | Line 24: | ||
* <code>-h</code> : human-readable, output numbers in a human-readable format<noinclude> | * <code>-h</code> : human-readable, output numbers in a human-readable format<noinclude> | ||
[[Category:Ubuntu Scripts and Commands|3]] | [[Category:Ubuntu Scripts and Commands|3]] | ||
</noinclude> | |||
<noinclude> | |||
<div id='devStage'> | |||
{{devStage | |||
| Прндл = Linux Server | |||
| Стадий = 1 | |||
| Фаза = Идентифициране | |||
| Статус = Създаване | |||
| ИдтПт = {{REVISIONUSER}} | |||
| ИдтДт = {{Today}} | |||
| ИдтРв = {{REVISIONID}} | |||
}} | |||
</div> | |||
</noinclude> | </noinclude> |
Revision as of 11:13, 4 August 2022
References
- …
- …
Section 1
…
# Синхронизиране на музика със SD карта...
rsync -rv --delete --append ./ /media/spas/01CB-0E14
# Копиране през SSH
rsync --progress -avz -e "ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null" pa4080-szs-vps:"/home/pa4080/SystemBackup/szs-vps-backup-${TODAY}.tgz" "$BACKUP_DIR"
rsync
via ssh
(source):
rsync --progress -vrazh <local-source> <ssh-host>:<remote-destination>
-v
: verbose-r
: copies data recursively (but don’t preserve timestamps and permission while transferring data-a
: archive mode, archive mode allows copying files recursively and it also preserves symbolic links, file permissions, user & group ownerships and timestamps-z
: compress file data-h
: human-readable, output numbers in a human-readable format