[rear-users] rear with Borg on USB

Vladimir Gozora rear at gozora.sk
Sat Feb 10 20:01:16 CET 2018


Hi,

I just finished first working version of Borg with USB back end code.
You can clone "borg_usb_dev" branch from my Github page.

git clone -b borg_usb_dev https://github.com/gozora/rear.git

PR against ReaR upstream master was not done yet, as I need to do some 
more testing first.

Here are some recommendations:

1. Target USB device must be formatted with rear `format -- <usb_device>' 
(this needs to be done only once and will obviously wipe your 
<usb_device>)

2. <usb_device> can't be mounted when `rear mkbackup/mkrescue' is 
triggered (error that device is already mounted will be thrown by ReaR).

3. USB_DEVICE=/dev/disk/by-label/REAR-000 (in local.conf) is used to point 
to backup destination.

4. As always when dealing with USB backups, carefully double-check device 
mapping when doing `rear recover'. It happened couple of time in the past 
that source disk partition information was destroyed because of bad user 
decision!!!

I've used following configuration during my tests:

====
OUTPUT=USB
BACKUP=BORG

USB_DEVICE=/dev/disk/by-label/REAR-000

BORGBACKUP_REPO="/my_borg_backup"
BORGBACKUP_UMASK="0002"

BORGBACKUP_PRUNE_WEEKLY=2

BORGBACKUP_ENC_TYPE="keyfile"
export BORG_PASSPHRASE="S3cr37_P455w0rD"

export BORG_RELOCATED_REPO_ACCESS_IS_OK="yes"
export BORG_UNKNOWN_UNENCRYPTED_REPO_ACCESS_IS_OK="yes"

BACKUP_PROG_EXCLUDE=( ${BACKUP_PROG_EXCLUDE[@]} '/mnt' '/media' '/var/tmp/*' '/tmp' )
GRUB_RESCUE=n

COPY_AS_IS_EXCLUDE=( "${COPY_AS_IS_EXCLUDE[@]}" )
COPY_AS_IS_BORG=( '/root/.config/borg/keys/' )

SSH_UNPROTECTED_PRIVATE_KEYS="yes"
SSH_FILES="yes"
====

Best regards

V.

On Wed, 7 Feb 2018, Vladimir Gozora wrote:

> In theory, you MAYBE could use OUTPUT=USB and point your BORGBACKUP_HOST to 
> localhost. This might work but I've never tried it.
>
> Best regards
>
> V.
>
> On Wed, 7 Feb 2018, Sascha Marcel Hacker wrote:
>
>> But if you set up borg, you have to set the borg repo host.
>> It does not saves the backup on the USB device,it only saves the 
>> environment for rear.
>> 
>> See: https://github.com/rear/rear/blob/master/usr/share/rear/conf/examples/borg-example.conf
>> 
>> Nice software, quite good for big envirments with many PCs.
>> I thinks its also nice for little home PC envirments to backup all data.
>> But in my case my home server is the biggst server in the house and its 
>> manage all my DHCP and DNS settings. (i know not the best solution but
>> very simple to manage and it save much energy)
>> If this one is down, i hove no ssh server to recover this maschine.
>> The only way is to setup a new standalone backup server or every time setup 
>> one pc as server wenn the mainserver is down.
>> An the other hand the home server is also a backupserver for the windows 
>> maschine with AD and roaming profiles.
>> 
>> 
>> 2018-02-05 16:13 GMT+01:00 Robert Owens <rowens at fdrinnovation.com>:
>>       In local.conf you can specify OUTPUT=USB (the default is OUTPUT=ISO).
>>
>>       You might also want to check out backuppc.  Although it doesn't have 
>> support yet in ReaR, it only requires an ssh server and rsync
>>       (or tar) in order to do a restore.  It does file pooling, which is 
>> similar to the deduplication that borg does, but it does it on
>>       entire files rather than chunks.
>>
>>       On 2/4/2018 11:15 PM, Sascha Marcel Hacker wrote:
>>       Hi, im am new at rear and also borg.
>>       I've been looking for a while now to find a good backup solution for 
>> my home storage server.
>>       It is a 5x2TB Raid system with ubuntu, with all of my dokuments, 
>> musik and family pictures I want to use it on.
>>       A backup solution with dedub, incremental, compression and with no 
>> down time is what i need.
>>       My previous backup soulution was a hotswap hdd for the system and a 
>> external hdd for the pictures and documents, all with tar
>>       and gzip.
>>
>>       But now i am looking for a new solution, something like acronis 
>> backup.
>>       I compared many backup programs like rsync, zbackup, bacula, ... and 
>> all this has brought me to borg.
>>       The only thing thats missing is a disaster solution, because I like 
>> to tinker with the system.
>>       So i bought a new external 8tb hdd to safe the whole system on.
>>
>>       In another forum i heard of rear and the option to choose borg as the 
>> backup backend.
>>       But for now i only found an example config with a network server. Is 
>> there any way to setup rear to use it with usb?
>>
>>       Sascha
>> 
>> 
>> 
>> _______________________________________________
>> rear-users mailing list
>> rear-users at lists.relax-and-recover.org
>> http://lists.relax-and-recover.org/mailman/listinfo/rear-users
>> 
>> 
>> _______________________________________________
>> rear-users mailing list
>> rear-users at lists.relax-and-recover.org
>> http://lists.relax-and-recover.org/mailman/listinfo/rear-users
>> 
>> 
>> 
>


More information about the rear-users mailing list