Both sides previous revision Previous revision Next revision | Previous revision |
home_server:home_server_setup:other_services:rsync [2023-05-28 Sun wk21 10:35] – [some rsync flag definitions] baumkp | home_server:home_server_setup:other_services:rsync [2023-12-26 Tue wk52 11:38] (current) – baumkp |
---|
{{tag>rsync backup linux debian ubuntu rsnapshot}} | {{tag>rsync backup linux debian rsnapshot}} |
======Rsync====== | ======Rsync====== |
These are my rsync notes. I also used to use rsnapshot, however I was unhappy with the performance of this application and moved to restic. The original rsnapshot notes have been rolled up and moved to the bottom of this page. | These are my rsync notes. I also used to use rsnapshot, however I was unhappy with the performance of this application and moved to restic. The original rsnapshot notes have been rolled up and moved to the bottom of this page. |
| |
''sudo rsync x -a -Puh /home/shared/temp/ baumkp@192.168.1.10::all/home/shared/html_kptree.net %%--%%exclude=.Trash* >tmp.txt'' | ''sudo rsync x -a -Puh /home/shared/temp/ baumkp@192.168.1.10::all/home/shared/html_kptree.net %%--%%exclude=.Trash* >tmp.txt'' |
| ++++ |
| |
| ====My web page copy bash batch==== |
| ''sudo vim Myscripts/rsync_shared.sh'' or to run ''sudo bash Myscripts/rsync_shared.sh'' |
| |
| #Note this is a local only script and takes no additional batch inputs when run! |
| ++++code| |
| <code bash> |
| #!/bin/bash |
| wwwpath='/home/shared/www/html' |
| workpath='/home/shared/html_kptree.net/' |
| cmd="rsync -ptoguv --chown=root:www-data --chmod=a+rwx,g+rwx,o-wx" |
| $cmd ${workpath}/styles.css ${wwwpath} |
| $cmd ${workpath}/w3.css ${wwwpath} |
| $cmd ${workpath}/index.html ${wwwpath} |
| $cmd ${workpath}/email_server_w3.html ${wwwpath} |
| </code> |
++++ | ++++ |
====some rsync flag definitions==== | ====some rsync flag definitions==== |
| Simply type ''rsync'' at terminal to see a complete list |
^Flag Short^ Flag Long ^Description^ | ^Flag Short^ Flag Long ^Description^ |
|''-z''| ''%%--%%compress'' |compress file data during the transfer| | |''-z''| ''%%--%%compress'' |compress file data during the transfer| |