Differences

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

Link to this comparison view

Next revision
Previous revision
public:computers:rsync_backup [29/01/26 13:56 GMT] – created johnpublic:computers:rsync_backup [29/01/26 15:22 GMT] (current) – [Rsync Laptop Backup] john
Line 2: Line 2:
  
  
-====== Rsync Laptop Backup ======+====== Laptop Backup via rsync ======
  
 ** A simple way to keep a backup of my laptop Home directory ** ** A simple way to keep a backup of my laptop Home directory **
Line 8: Line 8:
 ===== Backup hosts ===== ===== Backup hosts =====
  
-  * A NAS box on my home LAN : nas1 +**where to put the backups for safe keeping ** 
-  * An old Lenovo Laptop acting as a LAN file server : laptop + 
-  * My cloud VPS server : g4slv.info+  * A NAS box on my home LAN : ''nas1'' 
 +  * An old Lenovo Laptop acting as a LAN file server : ''laptop'' 
 +  * My cloud VPS server : ''g4slv.info''
  
 ===== Rsync Script ===== ===== Rsync Script =====
Line 19: Line 21:
  
 To reduce the traffic, and to limit backing up needless data (i.e. don't just backup the whole of $HOME) I have an ''exclude'' file that lists files and directories that should be ignored. To reduce the traffic, and to limit backing up needless data (i.e. don't just backup the whole of $HOME) I have an ''exclude'' file that lists files and directories that should be ignored.
 +
 +The backups are saved in a remote Directory called "devuan" - the laptop being backed up is running Devuan linux and has the hostname ''devuan''
 +
 +I also backup a mirror of the wiki to the local NAS and Laptop hosts (as long as I remember to pull a backup/mirror down from the wiki server first). There's no point in backing //this// up to the remote VPS - since that's the machine where the wiki lives in the first place!
  
 ==== Exclude ==== ==== Exclude ====
Line 54: Line 60:
 yadd_full* yadd_full*
 eSIM* eSIM*
 +bin/dokuwiki/*
  
 </code> </code>
Line 107: Line 114:
 if [ $INFO == 1 ] if [ $INFO == 1 ]
 then then
-rsync -av -e 'ssh -p 2182' --exclude-from=$EXCLUDEFROM $SOURCE $CLOUD:backups/$DEST+rsync -av -e 'ssh -p xxxx' --exclude-from=$EXCLUDEFROM $SOURCE $CLOUD:backups/$DEST
 else else
  echo "Server INFO not found"  echo "Server INFO not found"
Line 113: Line 120:
  
 </code> </code>
 +
 +
 +==== Dokuwiki Mirror/Backup ====
 +
 +I have a script to pull a copy of the dokuwiki files from the VPS and put them in ''/var/www/html/*'' on my laptop. The laptop runs ''apache2'' and can server the wiki itself. This mirror can be backed up through the above script to the other backup hosts ''nas1'' and ''laptop''
 +
 +<code bash>
 +#!/bin/bash
 +
 +rsync -av -e "ssh -p xxxx" --progress  xxxx@g4slv.info:/var/www/html/dokuwiki/ dokuwiki/
 +
 +sudo rsync -av dokuwiki/ /var/www/html/dokuwiki/
 +
 +sudo chown -R www-data:www-data /var/www/html/dokuwiki
 +
 +</code>
 +
 +
 --- //John Pumford-Green 29/01/26 13:48 GMT// --- //John Pumford-Green 29/01/26 13:48 GMT//
  
Line 119: Line 144:
  
  
-{{tag>}}+{{tag>computer backup}}
  
  

Navigation