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:27] fangfufupublic:using_btrbk_to_backup_my_home_partition [2017/07/10 16:37] – [Btrbk configuration] fangfufu
Line 33: Line 33:
 volume /mnt/home volume /mnt/home
         snapshot_preserve       24h 7d 4w         snapshot_preserve       24h 7d 4w
-        snapshot_preserve_min   1d+        snapshot_preserve_min   latest
         snapshot_dir snapshots         snapshot_dir snapshots
         subvolume home         subvolume home
Line 39: Line 39:
 volume ssh://127.0.0.1/mnt/home volume ssh://127.0.0.1/mnt/home
         ssh_identity /root/.ssh/id_rsa         ssh_identity /root/.ssh/id_rsa
-        target_preserve         no +        target_preserve         180d 
-        target_preserve         6m+        target_preserve         latest
         snapshot_create         no         snapshot_create         no
         snapshot_dir snapshots         snapshot_dir snapshots
         subvolume home         subvolume home
-                target send-receive /media/fangfufu/Hitachi500GB/home-backups+                target send-receive /media/fangfufu/WD500GB/home-backups
                 target send-receive /media/fangfufu/Seagate500GB/home-backups                 target send-receive /media/fangfufu/Seagate500GB/home-backups
 </code> </code>
Line 50: 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 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. +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. The side effect of that is the funny ''ssh'', ''sshd'', ''btrfs-send'', ''btrfs-receive'' CPU usage, when sending snapshot to external drives
  
 ===== Doing backup ===== ===== Doing backup =====
Line 70: 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 85: 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