Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
backup [2015/07/16 22:24]
slackermedia
backup [2021/06/03 19:48] (current)
Line 1: Line 1:
-[[{arrowp.png|border:​0;​background:​none;​width:​0;​display:​inline-block;​position:​absolute;​top:​0;​left:​0;​}sox|]] 
  
-[[{arrown.png|border:​0;​background:​none;​width:​0;​display:​inline-block;​position:​absolute;​top:​0;​margin-left:​2.5em;​}rescue|]] 
  
 /* if they are here, we dont need to convince them to backup /* if they are here, we dont need to convince them to backup
Line 103: Line 101:
 **3.** Perform an initial backup. **3.** Perform an initial backup.
  
 +<WRAP indent>
 The first backup is the largest and slowest backup because it is copying everything over to your backup drive. Subsequent backups will be much much smaller, because it will only copy changes to that base layer. The first backup is the largest and slowest backup because it is copying everything over to your backup drive. Subsequent backups will be much much smaller, because it will only copy changes to that base layer.
  
Line 116: Line 115:
  
 <​code>​ <​code>​
-$ rdiff-backup --terminal-verbosity 8 --print-statistics --exclude-globbing-filelist /​home/​klaatu/​.excludes /​home/​klaatu/​ /​safehouse/​klaatuWork/​+$ rdiff-backup --terminal-verbosity 8 --print-statistics ​
 +--exclude-globbing-filelist /​home/​klaatu/​.excludes /​home/​klaatu/ ​
 +/​safehouse/​klaatuWork/​
 </​code>​ </​code>​
  
Line 126: Line 127:
  
 <​code>​ <​code>​
-$ rdiff-backup --terminal-verbosity 8 --print-statistics --exclude-globbing-filelist /​home/​klaatu/​.excludes /​home/​klaatu/​ klaatu@10.1.1.11::/​safehouse/​klaatuWork/​+$ rdiff-backup --terminal-verbosity 8 --print-statistics ​
 +--exclude-globbing-filelist /​home/​klaatu/​.excludes /​home/​klaatu/ ​
 +klaatu@10.1.1.11::/​safehouse/​klaatuWork/​
 </​code>​ </​code>​
  
Line 215: Line 218:
  
 <​code>​ <​code>​
-#!/usr/bin/bash+#!/bin/sh
  
-echo $date > /​tmp/​udev.log+date > /​tmp/​udev.log
 </​code>​ </​code>​
  
Line 242: Line 245:
 With ''​udevadm''​ monitor running, plug in your backup drive and watch as all kinds of information is spewed out onto your screen. Notice, particularly,​ that the type of event is an ''​ADD''​ event. That's a good way of identifying what type of event we want. With ''​udevadm''​ monitor running, plug in your backup drive and watch as all kinds of information is spewed out onto your screen. Notice, particularly,​ that the type of event is an ''​ADD''​ event. That's a good way of identifying what type of event we want.
  
-The ''​udevadm''​ monitor provides a lot of good info, but we can see it with prettier formatting with the command ''​udevadm info'',​ assuming you know where your drive is currently located in your ''​dev''​ tree. If not, unplug and then plug your thumbdrive back in and then immediately issue this command:+The ''​udevadm''​ monitor provides a lot of good info, but we can see it with prettier formatting with the command ''​udevadm info -a -n'',​ assuming you know where your drive is currently located in your ''​dev''​ tree. If not, unplug and then plug your thumbdrive back in and then immediately issue this command:
  
 <​code>​ <​code>​
Line 256: Line 259:
 This will return a wealth of information. Focus on the first block of info, first. This will return a wealth of information. Focus on the first block of info, first.
  
-The feedback from ''​udevadm info''​ starts with the device specified by the ''​devpath'',​ and then walks up the chain of parent devices. It prints for every device found, all possible attributes in the ''​udev''​ rules key format. ​+The feedback from ''​udevadm info -a -n''​ starts with the device specified by the ''​devpath'',​ and then walks up the chain of parent devices. It prints for every device found, all possible attributes in the ''​udev''​ rules key format. ​
  
 A ''​udev''​ rule must contain one attribute from one single "​parent"​ device; parent attributes are things that describe a device from the most basic level, such as "​it'​s something that has been plugged into a physical port" or "it is something with a size of XX" or "this is a removable device"​. A ''​udev''​ rule must contain one attribute from one single "​parent"​ device; parent attributes are things that describe a device from the most basic level, such as "​it'​s something that has been plugged into a physical port" or "it is something with a size of XX" or "this is a removable device"​.
  
-That info, just under the ''​udevadm info''​ introductory paragraph, looks a little something like this:+That info, just under the ''​udevadm info -a -n''​ introductory paragraph, looks a little something like this:
  
 <​code>​ <​code>​
Line 457: Line 460:
  
 Consider purchasing a large-capacity thumbdrive and using it as either your master work directory or as your [[#​bkpconnect|plug-and-backup]] destination. That way, every time you plug your drive into your computer, it gets backed up; you no longer have to remember to do it manually! Consider purchasing a large-capacity thumbdrive and using it as either your master work directory or as your [[#​bkpconnect|plug-and-backup]] destination. That way, every time you plug your drive into your computer, it gets backed up; you no longer have to remember to do it manually!
 +
 +If you are using rdiff-backup,​ you can backup a single file between backup script occurrences:​
 +
 +<​code>​
 +$ rdiff-backup --include $HOME/​foo.txt --exclude '​**'​ $HOME /safehouse
 +</​code>​
  
 Another option is to wield the power of the Internet, and use a good git service. There are several simple clients for git, including the very appealing [[http://​sparkleshare.org|SparkeShare]] or, if you have access to a server and the time to configure it, [[http://​owncloud.org|ownCloud]]. These both have Dropbox-style sync folders. Another option is to wield the power of the Internet, and use a good git service. There are several simple clients for git, including the very appealing [[http://​sparkleshare.org|SparkeShare]] or, if you have access to a server and the time to configure it, [[http://​owncloud.org|ownCloud]]. These both have Dropbox-style sync folders.
Line 596: Line 605:
  
 <​code>​ <​code>​
-$ ssh-copy-id klaatu@example.com+$ ssh-copy-id ​-i /​home/​klaatu/​.ssh/​safehouse_rsa ​klaatu@example.com
 </​code>​ </​code>​
  
Line 667: Line 676:
 There are several good article on ''​rdiff-backup''​. [[http://​www.kirya.net/​articles/​backups-using-rdiff-backup]] is quite good. There are several good article on ''​rdiff-backup''​. [[http://​www.kirya.net/​articles/​backups-using-rdiff-backup]] is quite good.
  
-[[{arrown.png|border:​0;​background:​none;​width:​0;​display:​inline-block;​float:​right;​}rescue|]][[{arrowp.png|border:​0;​background:​none;​width:​0;​float:​right;​}sox|]]+<WRAP centeralign>​ 
 +<wrap fa>[[sox|R]]</​wrap>​ <wrap fa>[[start|S]]</​wrap>​ <wrap fa>​[[rescue|Q]]</​wrap>​ 
 +</​WRAP>​