How to copy the full backup to a USB hard drive weekly

338 views
Skip to first unread message

Andy Feys

unread,
Mar 31, 2021, 9:49:43 AM3/31/21
to bareos-users
Hi, 
I am very new to Bareos, so this might be a very stupid question. But I haven't been able to get this to work and can't seem to find the correct info for this.

I've succesfully installed two linux testservers, one acting as bareos server, the other uses bareos to backup its data to it. Both are ubuntu servers in case this matters.

This setup works perfectly. 

Now I would like to test the next important thing (for us anyway): I want to copy the backups from the bareos server to a usb hard drive for offsite storage.

Let's say I mount this hard disk in /extdisk.

What would it take and how could I copy everything from the bareos server to this disk so I can restore it all in case the location where the server is stored burns to the ground.

I have created a file in /etc/bareos/bareos-sd.d/device/ named USBStorage.conf with the following contents:

Device {
Name = USBStorage
Media Type = File
Archive Device = /extdisk
LabelMedia = no;
Random Access = yes;
AutomaticMount = yes;
RemoveableMedia = yes;
AlwaysOpen = no;
Description = "External USB drive"
}

I created a file USB.conf in /etc/bareos/bareos-dir.d/storage name USB.conf with the following contents:
Storage {
  Name = USB
  Address = testubuntubareos
  Password = ""
  Device = USBStorage
  Media Type = File
}

bconsole reload works without error after this. And I can see "USB" in the Storage Devices section of the web-ui. But I don't know how to define a correct job to create a copy of everything onto USB. 

Does anyone have any info about this? Or interesting weblinks where I can find the relevant info?

best regards, and thank you,
Andy


Jon SCHEWE

unread,
Mar 31, 2021, 10:29:50 AM3/31/21
to Andy Feys, bareos-users
First, make sure that your bootstrap files get written to that drive. This will help with recovery.
It might be helpful to have a database dump there as well.

A couple of options.

1) If your initial backups are using disk, you could just use rsync to keep the USB drive in sync at regular intervals.

2) If you are using tape or don't want to use rsync, you can use a copy job to do offsite backups. I have a system setup that every 2 weeks does a Virtual Full backup to the external drive and I take that drive offsite. The level for this job is "VirtualFull". The Storage and Virtual Full Pool properties are where you want to create the backup copy. The Pool attribute is where you want to copy from.
Searching for virtualfull on https://docs.bareos.org/Configuration/Director.html provides some help.


Jon Schewe

Research Scientist


C: +1 612.263.2718

O: +1 952.545.5720

jon.s...@rtx.com


Raytheon Technologies

Raytheon Intelligence & Space

5775 Wayzata Blvd. Suite 630

St. Louis Park, MN 55416


RTX.com | LinkedIn | Twitter | Instagram



From: bareos...@googlegroups.com <bareos...@googlegroups.com> on behalf of Andy Feys <andy...@gmail.com>
Sent: Wednesday, March 31, 2021 08:49
To: bareos-users <bareos...@googlegroups.com>
Subject: [External] [bareos-users] How to copy the full backup to a USB hard drive weekly
 
--
You received this message because you are subscribed to the Google Groups "bareos-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bareos-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bareos-users/1de0e5f4-0db5-46ff-8123-f2c8b4c097cfn%40googlegroups.com.

Andy Feys

unread,
Apr 7, 2021, 3:24:44 AM4/7/21
to bareos-users
Thank you, I've found out which files to copy/rsync to disk. If I copy the full folder /var/lib/bareos I have everything I need, I think.

Rick Sutphin

unread,
Apr 7, 2021, 8:33:56 AM4/7/21
to bareos...@googlegroups.com

I am doing something similar. I wrote small bash script that mounts the drive and runs rsync to copy the /var/lib/bareos folder to two USB drives that I rotate for offsite storage. The script is run daily by cron.

To view this discussion on the web visit https://groups.google.com/d/msgid/bareos-users/709a3121-fadb-451a-ba20-ce5775c6d5e9n%40googlegroups.com.

Rick Sutphin
Project Manager
Delta Technologies, Inc.
P.O. Box 2301
Tallahassee, FL 32316-2301
Ofc: 850.575.3977
Fax: 850.575.3908
Cell: 850.251.2345
https://delta-tech.com

Licenses: EF-20000414, ES-0000212 (FL) & LVU405002 (GA)

Reply all
Reply to author
Forward
0 new messages