Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
home_server:home_server_setup:other_services:rsync [2023-05-28 Sun wk21 10:35] – [some rsync flag definitions] baumkphome_server:home_server_setup:other_services:rsync [2025-01-17 Fri wk03 12:54] (current) – [Rsnapshot] baumkp
Line 1: Line 1:
-{{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.
Line 16: Line 16:
   *''-a'' is the flag for archive.  Keeps original dates and permissions on copy and also recurses, copied sub-directories and content.   *''-a'' is the flag for archive.  Keeps original dates and permissions on copy and also recurses, copied sub-directories and content.
   *''-u'' only copies source files where they are newer than destination files (based upon file modification dates)   *''-u'' only copies source files where they are newer than destination files (based upon file modification dates)
-  *''--delete'' deletes files on the destination where they are not on the source.  **//Use with care!//**+  *''%%--delete%%'' deletes files on the destination where they are not on the source.  **//Use with care!//**
   *''-n'' is for dry run, no changes are made, but proposed output is seen   *''-n'' is for dry run, no changes are made, but proposed output is seen
   *''-P'' keeps partially copies files and reports progress   *''-P'' keeps partially copies files and reports progress
Line 80: Line 80:
  
 ''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|
Line 130: Line 148:
  
 ====Rsnapshot==== ====Rsnapshot====
-These are some rsnapshot and related rsync notes.  They are really long! Sadly the original source was only onlie for a few years.+These are some rsnapshot and related rsync notes.  They are really long! Sadly the original source was only online for a few years.
  
 ++++Rsnapshot and Old Rsync notes, really tl;dr;| ++++Rsnapshot and Old Rsync notes, really tl;dr;|