Changes

Jump to navigation Jump to search
1,773 bytes added ,  5 years ago
no edit summary
Line 78: Line 78:     
     service cron reload
 
     service cron reload
 +
 +
= Mounting and restoring =
 +
Borg makes it easy to mount a backup on the server using "borgfs". 
 +
 +
If this is done on a different server or during a restore operation on new servers, the key files need to be imported from the paper key.  Selected admin users have the paper keys backed up in encrypted email.
 +
 +
For example on a our db-fnt server:
 +
 +
Take the first 5 lines from the /srv/borg.sh file and export them on the cli:
 +
 +
    export BORG_REMOTE_PATH=/usr/local/bin/borg1/borg1
 +
    export HOST=
 +
    export BORG_REPO=
 +
    export BORG_PASSPHRASE=
 +
    export BORG=/usr/local/bin/borg
 +
 +
Note if doing this on a different server, BORG_REPO= must be the server you intend to restore from.
 +
 +
  #import the paper key
 +
  borg key import --paper $BORG_REPO
 +
 
 +
  #make a directory to mount the backups on:
 +
  mkdir /mnt/backups
 +
 
 +
  #now mount the borg repo
 +
  borgfs $BORG_REPO /mnt/backups/
 +
 +
The files will now be in /mnt/backups:
 +
 +
    ls  /mnt/backups/
 +
    db-fnt.allstarlink.org-2018-10-31_08:30  db-fnt.allstarlink.org-2019-02-28_08:30
 +
    db-fnt.allstarlink.org-2018-11-30_08:30  db-fnt.allstarlink.org-2019-03-02_08:30
 +
    db-fnt.allstarlink.org-2018-12-31_08:30  db-fnt.allstarlink.org-2019-03-03_08:30
 +
    db-fnt.allstarlink.org-2019-01-31_08:30  db-fnt.allstarlink.org-2019-03-04_08:30
 +
    db-fnt.allstarlink.org-2019-02-03_08:30  db-fnt.allstarlink.org-2019-03-05_08:30
 +
    db-fnt.allstarlink.org-2019-02-10_08:30  db-fnt.allstarlink.org-2019-03-06_08:30
 +
    db-fnt.allstarlink.org-2019-02-17_08:30  db-fnt.allstarlink.org-2019-03-07_08:30
 +
    db-fnt.allstarlink.org-2019-02-24_08:30  db-fnt.allstarlink.org-2019-03-08_08:30
 +
 +
You can now go into any of these directories and restore files as of the date for the respective directory using normal UNIX utilities.
 +
 +
 +
 +
 
[[Category: Infrastructure]]
 
[[Category: Infrastructure]]

Navigation menu