User Tools

Site Tools


public:using_btrbk_to_backup_my_home_partition

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
Next revisionBoth sides next revision
public:using_btrbk_to_backup_my_home_partition [2017/07/07 08:25] – [Btrbk configuration] fangfufupublic:using_btrbk_to_backup_my_home_partition [2017/07/07 08:27] – [Sending snapshots to the external hard drive] fangfufu
Line 1: Line 1:
 ====== Using Btrbk to backup my home partition ====== ====== Using Btrbk to backup my home partition ======
-Due to the [[public:2017-06-14_data_extinction_event_investigation_report|fiasco]] of running ''rm -rf'' on my home partition, and wiping out all my backup snapshots, I realised that it is important to have some sort of offline backups. Snapper [([[http://snapper.io/|Snapper, The ultimate Snapshot Tool for Linux]])] creates snapshots, but manual operations are required to move those snapshots off to external backup devices (in order to offline backups). A better solution is desperately needed. I discovered Btrbk [([[https://github.com/digint/btrbk|GitHub - digint/btrbk: Tool for creating snapshots and remote backups]])]. +Due to the [[public:2017-06-14_data_extinction_event_investigation_report|fiasco]] of running ''rm -rf'' on my home partition, and wiping out all my backup snapshots, I realised that it is important to have some sort of offline backups. Snapper [([[http://snapper.io/|Snapper, The ultimate Snapshot Tool for Linux]])] creates snapshots, but manual operations are required to move those snapshots off to external backup devices (in order to offline backups). A better solution is desperately needed. I discovered Btrbk [(btrbk_github > 
 + [[https://github.com/digint/btrbk|GitHub - digint/btrbk: Tool for creating snapshots and remote backups]])]. 
  
 It is much harder to understand, please read the man page. I am just going to document what I did to my own machine.  It is much harder to understand, please read the man page. I am just going to document what I did to my own machine. 
Line 49: Line 50:
 Basically, my laptop is configured to save 24 hourly snapshots, 7 daily snapshots, 4 weekly snapshots. The external backup drive has 6 months of snapshots.  Basically, my laptop is configured to save 24 hourly snapshots, 7 daily snapshots, 4 weekly snapshots. The external backup drive has 6 months of snapshots. 
  
-The extra ''[[ssh://127.0.0.1/mnt/home]]'' paragraph basically follows the "Example: multiple btrbk instances" on the [[https://github.com/digint/btrbk|btrbk's Github page]]. This allows ''snapshot_dir'' to get cleared up locally. If you write everything in one paragraph, then btrbk refuses to clean up snapshots, because external hard drives are not connected. If you write another paragraph of ''volume /mnt/home'', then btrbk complains that the two snapshots are created at the same directory. +The extra ''[[ssh://127.0.0.1/mnt/home]]'' paragraph basically follows the "Example: multiple btrbk instances" on the btrbk's Github page[(btrbk_github)]. This allows ''snapshot_dir'' to get cleared up locally. If you write everything in one paragraph, then btrbk refuses to clean up snapshots, because external hard drives are not connected. If you write another paragraph of ''volume /mnt/home'', then btrbk complains that the two snapshots are created at the same directory. 
  
 ===== Doing backup ===== ===== Doing backup =====
Line 69: Line 70:
  
 <code> <code>
-fangfufu@smithsonian:~$ sudo btrbk run+btrbk command line client, version 0.25.0  (Fri Jul  7 09:27:21 2017) 
 +Using configuration: /etc/btrbk/btrbk.conf 
 +WARNING: Skipping target "/media/fangfufu/Hitachi500GB/home-backups"Failed to fetch subvolume detail 
 +WARNING: Skipping target "/media/fangfufu/Seagate500GB/home-backups": Failed to fetch subvolume detail 
 +Using transaction log: /var/log/btrbk.log 
 +Creating subvolume snapshot for: /mnt/home/home 
 +[snapshot] source: /mnt/home/home 
 +[snapshot] target: /mnt/home/snapshots/home.20170707T092721+0100 
 +Cleaning snapshots: /mnt/home/snapshots/home.* 
 +Deleted 0 subvolumes in: /mnt/home/snapshots/home.* 
 +WARNING: Skipping cleanup of snapshots for subvolume "127.0.0.1:/mnt/home/home", as at least one target aborted earlier 
 +Completed within: 0s  (Fri Jul  7 09:27:21 2017)
 -------------------------------------------------------------------------------- --------------------------------------------------------------------------------
 Backup Summary (btrbk command line client, version 0.25.0) Backup Summary (btrbk command line client, version 0.25.0)
  
-    Date:   Thu Jul  6 13:27:46 2017+    Date:   Fri Jul  7 09:27:21 2017
     Config: /etc/btrbk/btrbk.conf     Config: /etc/btrbk/btrbk.conf
  
Line 84: Line 96:
 -------------------------------------------------------------------------------- --------------------------------------------------------------------------------
 /mnt/home/home /mnt/home/home
-+++ /mnt/home/snapshots/home.20170706T132746+0100 ++++ /mnt/home/snapshots/home.20170707T092721+0100 
->>> /media/fangfufu/Hitachi500GB/home-backups/home.20170706T011701+0100 + 
->>> /media/fangfufu/Hitachi500GB/home-backups/home.20170706T021701+0100 +127.0.0.1:/mnt/home/home 
->>> /media/fangfufu/Hitachi500GB/home-backups/home.20170706T101701+0100 +!!! Target "/media/fangfufu/Hitachi500GB/home-backups" aborted: Failed to fetch subvolume detail 
->>> /media/fangfufu/Hitachi500GB/home-backups/home.20170706T111701+0100 +!!! Target "/media/fangfufu/Seagate500GB/home-backups" aborted: Failed to fetch subvolume detail 
->>> /media/fangfufu/Hitachi500GB/home-backups/home.20170706T132746+0100 + 
-</code>+NOTE: Some errors occurred, which may result in missing backups! 
 +Please check warning and error messages above.</code>
  
 ===== Accesing snapshots ===== ===== Accesing snapshots =====
public/using_btrbk_to_backup_my_home_partition.txt · Last modified: 2018/03/31 00:38 by 127.0.0.1