Bareos
Содержание:
- Using different IP Adresses for SD – FD Communication¶
- Usage
- File Selection Commands¶
- Volume Shadow Copy Service (VSS)¶
- Decide about the Database Backend¶
- Dealing with Windows Problems¶
- Prepare Bareos database¶
- Windows Ownership and Permissions Problems¶
- Catalog Database¶
- Borg как новый путь
- Updating the configuration files¶
- Using File Relocation¶
- Backup/Restore of Windows Registry¶
- Backing Up Your Bareos Database¶
- Bareos Komponenten / Services
- Upgrade from 15.2 to 16.2¶
- Additional information¶
- move
- Описание пакетов
- Selecting Files by Filename¶
Using different IP Adresses for SD – FD Communication¶
Bareos supports network topologies where the Bareos File Daemon and Bareos Storage Daemon are situated inside of a LAN, but the Bareos Director is outside of that LAN in the Internet and accesses the Bareos File Daemon and Bareos Storage Daemon via SNAT / port forwarding.
Consider the following scheme:
/-------------------\ | | LAN 10.0.0.1/24 | | | FD_LAN SD_LAN | | .10 .20 | | | \___________________/ | NAT Firewall FD: 8.8.8.10 -> 10.0.0.10 SD: 8.8.8.20 -> 10.0.0.20 | /-------------------\ | | | | WAN / Internet | DIR | | 8.8.8.100 | | | | FD_WAN SD_WAN | | .30 .40 | \___________________/
The Bareos Director can access the FD_LAN via the IP 8.8.8.10, which is forwarded to the IP 10.0.0.10 inside of the LAN.
The Bareos Director can access the SD_LAN via the IP 8.8.8.20 which is forwarded to the IP 10.0.0.20 inside of the LAN.
There is also a Bareos File Daemon and a Bareos Storage Daemon outside of the LAN, which have the IPs 8.8.8.30 and 8.8.8.40
All resources are configured so that the Address directive gets the address where the Bareos Director can reach the daemons.
Additionally, devices being in the LAN get the LAN address configured in the Lan Address directive. The configuration looks as follows:
bareos-dir.d/client/FD_LAN.conf
Client { Name = FD_LAN Address = 8.8.8.10 LanAddress = 10.0.0.10 ... }
bareos-dir.d/client/SD_LAN.conf
Storage { Name = SD_LAN Address = 8.8.8.20 LanAddress = 10.0.0.20 ... }
bareos-dir.d/client/FD_WAN.conf
Client { Name = FD_WAN Address = 8.8.8.30 ... }
bareos-dir.d/client/SD_WAN.conf
Storage { Name = SD_WAN Address = 8.8.8.40 ... }
This way, backups and restores from each Bareos File Daemon using each Bareos Storage Daemon are possible as long as the firewall allows the needed network connections.
The Bareos Director simply checks if both the involved Bareos File Daemon and Bareos Storage Daemon both have a Lan Address ( and ) configured.
In that case, the initiating daemon is ordered to connect to the Lan Address instead of the Address. In active client mode, the Bareos File Daemon connects to the Bareos Storage Daemon, in passive client mode (see ) the Bareos Storage Daemon connects to the Bareos File Daemon.
Usage
# bareos-fuse.py --help Bareos Fuse filesystem: displays files from Bareos backups as a (userspace) filesystem. bareos-fuse.py Options: -h, --help show this help message and exit -o opt, mount options -o address=BAREOS_DIRECTOR address of the Bareos Director to connect -o port=PORT address of the Bareos Director to connect -o dirname=NAME name of the Bareos Director to connect -o name=NAME name of the Bareos Named Console -o password=PASSWORD password to authenticate at Bareos Director -o restoreclient=client Bareos client used to restore files -o restorepath=PATH path prefix to restore files [default: "/var/cache/bareosfs/"] -o logfile=FILENAME if given, log to FILENAME
Mount bareosfs via Bareos Default Console (without console name):
bareos-fuse.py -o address=localhost,password=secret,logfile=/var/log/bareosfs.log /mnt
File Selection Commands¶
After you have selected the Jobs to be restored and Bareos has created the in-memory directory tree, you will enter file selection mode as indicated by the dollar sign ($) prompt. While in this mode, you may use the commands listed above. The basic idea is to move up and down the in memory directory structure with the cd command much as you normally do on the system. Once you are in a directory, you may select the files that you want restored. As a default no files are marked to be restored. If
you wish to start with all files, simply enter: cd / and mark *. Otherwise proceed to select the files you wish to restore by marking them with the mark command. The available commands are:
- cd
-
The cd command changes the current directory to the argument specified. It operates much like the Unix cd command. Wildcard specifications are not permitted.
Note, on Windows systems, the various drives (c:, d:, …) are treated like a directory within the file tree while in the file selection mode. As a consequence, you must do a cd c: or possibly in some cases a cd C: (note upper case) to get down to the first directory.
- dir
- The dir command is similar to the ls command, except that it prints it in long format (all details). This command can be a bit slower than the ls command because it must access the catalog database for the detailed information for each file.
- estimate
- The estimate command prints a summary of the total files in the tree, how many are marked to be restored, and an estimate of the number of bytes to be restored. This can be useful if you are short on disk space on the machine where the files will be restored.
- find
- The find command accepts one or more arguments and displays all files in the tree that match that argument. The argument may have wildcards. It is somewhat similar to the Unix command find / -name arg.
- ls
-
The ls command produces a listing of all the files contained in the current directory much like the Unix ls command. You may specify an argument containing wildcards, in which case only those files will be listed.
Any file that is marked to be restored will have its name preceded by an asterisk (). Directory names will be terminated with a forward slash (/) to distinguish them from filenames.
- lsmark
- The lsmark command is the same as the ls except that it will print only those files marked for extraction. The other distinction is that it will recursively descend into any directory selected.
- mark
-
The mark command allows you to mark files to be restored. It takes a single argument which is the filename or directory name in the current directory to be marked for extraction. The argument may be a wildcard specification, in which case all files that match in the current directory are marked to be restored. If the argument matches a directory rather than a file, then the directory and all the files contained in that directory
(recursively) are marked to be restored. Any marked file will have its name preceded with an asterisk () in the output produced by the ls or dir commands. Note, supplying a full path on the mark command does not work as expected to select a file or directory in the current directory. Also, the mark command works on the current and lower directories but does not touch higher level directories.After executing the mark command, it will print a brief summary:
No files marked.
If no files were marked, or:
nn files marked.
if some files are marked.
- unmark
- The unmark is identical to the mark command, except that it unmarks the specified file or files so that they will not be restored. Note: the unmark command works from the current directory, so it does not unmark any files at a higher level. First do a cd / before the unmark * command if you want to unmark everything.
- pwd
- The pwd command prints the current working directory. It accepts no arguments.
- count
- The count command prints the total files in the directory tree and the number of files marked to be restored.
- done
- This command terminates file selection mode.
- exit
- This command terminates file selection mode (the same as done).
- quit
- This command terminates the file selection and does not run the restore job.
- help
- This command prints a summary of the commands available.
- ?
- This command is the same as the help command.
If your filename contains some weird caracters, you can use , or . For example, if your filename contains a \, you can use \.
* mark weird_file\\\\with-backslash
Volume Shadow Copy Service (VSS)¶
VSS is available since Windows XP. From the perspective of a backup-solution for Windows, this is an extremely important step. VSS allows Bareos to backup open files and even to interact with applications like RDBMS to produce consistent file copies. VSS aware applications are called VSS Writers, they register with the OS so that when Bareos wants to do a Snapshot, the OS will notify the register Writer programs, which may then create a consistent state in their application, which will be backed
up. Examples for these writers are “MSDE” (Microsoft database engine), “Event Log Writer”, “Registry Writer” plus 3rd party-writers. If you have a non-vss aware application a shadow copy is still generated and the open files can be backed up, but there is no guarantee that the file is consistent.
Bareos produces a message from each of the registered writer programs when it is doing a VSS backup so you know which ones are correctly backed up.
Technically Bareos creates a shadow copy as soon as the backup process starts. It does then backup all files from the shadow copy and destroys the shadow copy after the backup process. Please have in mind, that VSS creates a snapshot and thus backs up the system at the state it had when starting the backup. It will disregard file changes which occur during the backup process.
VSS can be turned on by placing an
Enable VSS = yes
in your FileSet resource.
The VSS aware File daemon has the letters VSS on the signon line that it produces when contacted by the console. For example:
Tibs-fd Version 1.37.32 (22 July 2005) VSS Windows XP MVS NT 5.1.2600
the VSS is shown in the line above. This only means that the File daemon is capable of doing VSS not that VSS is turned on for a particular backup. There are two ways of telling if VSS is actually turned on during a backup. The first is to look at the status output for a job, e.g.:
Running Jobs JobId 1 Job NightlySave.2005-07-23_13.25.45 is running. VSS Backup Job started 23-Jul-05 1325 Files=70,113 Bytes=3,987,180,650 Bytessec=3,244,247 Files Examined=75,021 Processing file cDocuments and SettingsuserMy DocumentsMy PicturesMisc1Sans titre - 39.pdd SDReadSeqNo=5 fd=352
Here, you see under Running Jobs that JobId 1 is “VSS Backup Job started …” This means that VSS is enabled for that job. If VSS is not enabled, it will simply show “Backup Job started …” without the letters VSS.
The second way to know that the job was backed up with VSS is to look at the Job Report, which will look something like the following:
23-Jul 1325 rufus-dir Start Backup JobId 1, Job=NightlySave.2005-07-23_13.25.45 23-Jul 1326 rufus-sd Wrote label to prelabeled Volume "TestVolume001" on device "DDS-4" (devnst0) 23-Jul 1326 rufus-sd Spooling data ... 23-Jul 1326 Tibs Generate VSS snapshots. Driver="VSS WinXP", Drive(s)="C" 23-Jul 1326 Tibs VSS Writer "MSDEWriter", State 1 (VSS_WS_STABLE) 23-Jul 1326 Tibs VSS Writer "Microsoft Writer (Bootable State)", State 1 (VSS_WS_STABLE) 23-Jul 1326 Tibs VSS Writer "WMI Writer", State 1 (VSS_WS_STABLE) 23-Jul 1326 Tibs VSS Writer "Microsoft Writer (Service State)", State 1 (VSS_WS_STABLE)
In the above Job Report listing, you see that the VSS snapshot was generated for drive C (if other drives are backed up, they will be listed on the bconsoleOutput{Drive(s)=”C”} line. You also see the reports from each of the writer program. Here they all report VSS_WS_STABLE, which means that you will get a consistent snapshot of the data handled by that writer.
Decide about the Database Backend¶
Bareos offers the following database backends:
- PostgreSQL
- This is the preferred default database backend. It is contained in package bareos-database-postgresql.
If you need to think about which backend to use, this is your choice! - MariaDB/MySQL
-
Deprecated since version 19.0.0.
This backend is provided only for backwards compatibility with existing MariaDB/MySQL deployments.
It is contained in package bareos-database-mysql.
This is not the right choice for a new deployment. - Sqlite
- This backend is for testing purposes only.
It is contained in package bareos-database-sqlite3.
Do not use this in production.
The Bareos database packages have their dependencies only to the database client packages, therefore the database itself must be installed manually.
Dealing with Windows Problems¶
Antivirus Program
If you are not using the portable option, and you have (Volume Shadow Copy) enabled in the Bareos Director and you experience problems with Bareos not being able to open files, it is most likely that you are running an antivirus program that blocks Bareos from doing certain operations. In this case, disable the antivirus program and try another backup. If it succeeds, either get a different (better) antivirus program or use
something like / to turn off the antivirus program while the backup is running.
If turning off anti-virus software does not resolve your VSS problems, you might have to turn on VSS debugging. The following link describes how to do this: http://support.microsoft.com/kb/887013/en-us.
Prepare Bareos database¶
We assume that you have already your database installed and basically running. Using the PostgreSQL database backend is recommended.
The easiest way to set up a database is using an system account that have passwordless local access to the database. Often this is the user root for MySQL and the user postgres for PostgreSQL.
For details, see chapter .
Debian based Linux Distributions
Since Bareos Version >= 14.2.0 the Debian (and Ubuntu) based packages support the dbconfig-common mechanism to create and update the Bareos database.
Follow the instructions during install to configure it according to your needs.
If you decide not to use dbconfig-common (selecting <No> on the initial dialog), follow the instructions for .
The selectable database backends depend on the bareos-database-* packages installed.
For details see .
Windows Ownership and Permissions Problems¶
If you restore files backed up from Windows to an alternate directory, Bareos may need to create some higher level directories that were not saved (or restored). In this case, the File daemon will create them under the SYSTEM account because that is the account that Bareos runs under as a service and with full access permission. However, there may be cases where you have problems accessing those files even if you run as administrator. In principle, Microsoft supplies you with the way to cease
the ownership of those files and thus change the permissions. However, a much better solution to working with and changing Win32 permissions is the program SetACL, which can be found at http://setacl.sourceforge.net/.
If you have not installed Bareos while running as Administrator and if Bareos is not running as a Process with the userid (User Name) SYSTEM, then it is very unlikely that it will have sufficient permission to access all your files.
Catalog Database¶
Bareos stores its catalog in a database. Different database backends are offered:
- PostgreSQL (recommended)
- MariaDB/MySQL (deprecated)
- Sqlite (deprecated)
What database will be used, can be configured in the Bareos Director configuration, see the .
The database often runs on the same server as the Bareos Director. However, it is also possible to run it on a different system. This might require some more manual configuration, a PostgreSQL example can be found in .
dbconfig-common (Debian)
Since Bareos Version >= 14.2.0 the Debian (and Ubuntu) based packages support the dbconfig-common mechanism to create and update the Bareos database, according to the user choices.
The first choice is, if dbconfig-common should be used at all. If you decide against it, the database must be configured manually, see .
If you decided to use dbconfig-common, the next question will only be asked, if more than one Bareos database backend (bareos-database-*) is installed. If this is the case, select the database backend you want to use.
Depending on the selected database backend, more questions about how to access the database will be asked. Often, the default values are suitable.
The dbconfig-common configuration (and credentials) is done by the bareos-database-common package. Settings are stored in the file . If you need to repeat this step, you can use the dpkg-reconfigure bareos-database-common command.
The Bareos database backend will get automatically configured in . If the Server is not running locally you need to specify in the catalog resource. A later reconfiguration might require manual adapt changes.
Warning
When using the PostgreSQL backend and updating to Bareos < 14.2.3, it is necessary to manually grant database permissions (grant_bareos_privileges), normally by
su - postgres -c /usr/lib/bareos/scripts/grant_bareos_privileges
For details see chapter .
Borg как новый путь
BorgBackupдокументации проекта
- Дедупликация: настоящая и очень эффективная (примеры будут ниже). Файлы в рамках одного Borg repository (т.е. специальном каталоге в специфичном для Borg формате) делятся на блоки по n мегабайт, а повторяющиеся блоки Borg дедуплицирует. Дедупликация происходит именно до сжатия.
- Сжатие: после дедупликации данные ещё и сжимаются. Доступны разные алгоритмы сжатия: lz4, lzma, zlib, zstd. Стандартная фича любого бэкапа, но от этого не менее полезная.
- Работа по SSH: Borg бэкапит на удалённый сервер по SSH. На стороне сервера нужен просто установленный Borg и всё! Отсюда сразу вытекают такие плюсы, как безопасность и шифрование. Вы можете настроить доступ только по ключам и, более того, выполнение Borg’ом только одной своей команды при заходе на сервер. Например, так:
- Поставляется как в PPA (мы преимущественно используем Ubuntu), так и статичным бинарником. Borg в виде статичного бинарника даёт возможность запускать его практически везде, где есть хоть минимально современный glibc. (Но не везде — например, не удалось запустить на CentOS 5.)
- Гибкая очистка от старых бэкапов. Можно задать как хранение n последних бэкапов, так и 2 бэкапа в час/день/неделю. В последнем случае будет оставлен последний на конец недели бэкап. Условия можно комбинировать, сделав хранение 7 ежедневных бэкапов за последние 7 дней и 4 недельных.
Updating the configuration files¶
When updating Bareos through the distribution packaging mechanism, the existing configuration kept as they are.
If you don’t want to modify the behavior, there is normally no need to modify the configuration.
However, in some rare cases, configuration changes are required. These cases are described in the .
With Bareos version 16.2.4 the default configuration uses the . This scheme offers various improvements. However, if your are updating from earlier versions, your existing single configuration files () stay in place and are contentiously used by Bareos. The new default configuration resource files will also be installed (). However,
they will only be used, when the legacy configuration file does not exist.
Using File Relocation¶
Introduction
The where= option is simple, but not very powerful. With file relocation, Bareos can restore a file to the same directory, but with a different name, or in an other directory without recreating the full path.
You can also do filename and path manipulations, such as adding a suffix to all your files, renaming files or directories, etc. Theses options will overwrite where= option.
For example, many users use OS snapshot features so that file will be backed up from the directory , which can complicate restores. If you use where=/tmp, the file will be restored to and you will have to move the file to by hand.
However, case, you could use the strip_prefix=/.snap and add_suffix=.bkp options and Bareos will restore the file to its original location – that is .
To use this feature, there are command line options as described in the of this manual; you can modify your restore job before running it; or you can add options to your restore job in as described in and .
Parameters to modify: 1: Level 2: Storage ... 10: File Relocation ... Select parameter to modify (1-12): This will replace your current Where value 1: Strip prefix 2: Add prefix 3: Add file suffix 4: Enter a regexp 5: Test filename manipulation 6: Use this ? Select parameter to modify (1-6):
Backup/Restore of Windows Registry¶
The Windows Registry can be backed up using VSS.
The VSS Registry Writer will make sure you can take a stable backup of the registry hives.
The Registry is structured as different hives that are stored in separate files.
You can find a list of hives with the corresponding files in the Registry itself under .
By backing up the file that one of the hives is stored in, you’ll get a backup of that part of the Registry.
Well-Known Hives
Registry Key | File Location | Description |
---|---|---|
HKU\<User-SID> | %systemdrive%\Users\%username%\NTUSER.DAT | User Registry (each users’s HKCU) |
HKLM\BCD00000000 | \Device\HarddiskVolume1\Boot\BCD | Boot Configuration Database |
HKLM\COMPONENTS | %systemroot%\System32\config\COMPONENTS | Component Based Servicing |
HKLM\HARDWARE | in-memory only | Hardware information determined at runtime |
HKLM\SAM | %systemroot%\System32\config\SAM | Security Accounts Manager |
HKLM\SECURITY | %systemroot%\System32\config\SECURITY | Security Policies and User Permission |
HKLM\SOFTWARE | %systemroot%\System32\config\SOFTWARE | System-wide settings, Application Settings |
HKLM\SYSTEM | %systemroot%\System32\config\SYSTEM | Startup config, drivers and system services |
HKU.DEFAULT | %systemroot%\System32\config.DEFAULT | User Hive for Local System |
HKU\S-1-5-18 | %systemroot%\System32\config.DEFAULT | User Hive for Local System (alternate path) |
HKU\S-1-5-19 | %systemroot%\ServiceProfiles\LocalService\Ntuser.dat | User Hive for Local Service |
HKU\S-1-5-20 | %systemroot%\ServiceProfiles\NetworkService\Ntuser.dat | User Hive for Network Service |
Backing Up Your Bareos Database¶
If ever the machine on which your Bareos database crashes, and you need to restore from backup tapes, one of your first priorities will probably be to recover the database. Although Bareos will happily backup your catalog database if it is specified in the FileSet, this is not a very good way to do it, because the database will be saved while Bareos is modifying it. Thus the database may be in an instable state. Worse yet, you will backup the database before all the Bareos updates have been
applied.
To resolve these problems, you need to backup the database after all the backup jobs have been run. In addition, you will want to make a copy while Bareos is not modifying it. To do so, you can use two scripts provided in the release make_catalog_backup and delete_catalog_backup. These files will be automatically generated along with all the other Bareos scripts. The first script will make an ASCII copy of your Bareos database into bareos.sql in the working directory you specified in your
configuration, and the second will delete the bareos.sql file.
The basic sequence of events to make this work correctly is as follows:
- Run all your nightly backups
- After running your nightly backups, run a Catalog backup Job
- The Catalog backup job must be scheduled after your last nightly backup
- You use to create the ASCII backup file and to clean up
Assuming that you start all your nightly backup jobs at 1:05 am (and that they run one after another), you can do the catalog backup with the following additional Director configuration statements:
bareos-dir.d/job/BackupCatalog.conf
# Backup the catalog database (after the nightly save) Job { Name = "BackupCatalog" Type = Backup Client=rufus-fd FileSet="Catalog" Schedule = "WeeklyCycleAfterBackup" Storage = DLTDrive Messages = Standard Pool = Default # This creates an ASCII copy of the catalog # Arguments to make_catalog_backup.pl are: # make_catalog_backup.pl <catalog-name> RunBeforeJob = "/usr/lib/bareos/scripts/make_catalog_backup.pl MyCatalog" # This deletes the copy of the catalog RunAfterJob = "/usr/lib/bareos/scripts/delete_catalog_backup" # This sends the bootstrap via mail for disaster recovery. # Should be sent to another system, please change recipient accordingly Write Bootstrap = "|/usr/sbin/bsmtp -h localhost -f \"\(Bareos\) \" -s \"Bootstrap for Job %j\" root@localhost" }
bareos-dir.d/schedule/WeeklyCycleAfterBackup.conf
# This schedule does the catalog. It starts after the WeeklyCycle Schedule { Name = "WeeklyCycleAfterBackup" Run = Level=Full sun-sat at 1:10 }
bareos-dir.d/fileset/Catalog.conf
# This is the backup of the catalog FileSet { Name = "Catalog" Include { Options { signature=MD5 } File = "/var/lib/bareos/bareos.sql" # database dump File = "/etc/bareos" # configuration } }
It is preferable to write/send the file to another computer. It will allow you to quickly recover the database backup should that be necessary. If you do not have a bootstrap file, it is still possible to recover your database backup, but it will be more work and take longer.
Bareos Komponenten / Services
Bareos nutzt diverse Komponenten die individuell konfiguriert werden können und ineinander verzahnen.
Director
Der Bareos Director ist die Zentrale für alle Daemons. Hier läuft alles zusammen und wird entsprechend gesteuert. So auch die zentralen Elemente Backup und Restore, die durch den Admin gesteuert werden. Der Director läuft als Daemon im Hintergrund.
Console
Die Konsole (bconsole) ist das Tool das dem Admin an die Hand gegeben wird um mit dem Bareos Director zu kommunizieren. Es läuft in der Shell und ermöglicht die Planung und Ausführung von Backups und Restores. Mehr Info unter: h
File Daemon
Der File Daemon ist ein Programm das auf jedem Client der gesichert werden soll, installiert werden muss. Nach Aufforderung des Director findet der File Daemon die zu sichernden Dateien und übermittelt diese zurück an den Director zum Storage Daemon. In Abhängigkeit vom eingesetzten Betriebssystems ist er auch für die Dateiattribute zuständig. Bei einem Restore ist er ebenso für Dateiabhängigkeiten und deren Attribute zuständig. Der File Daemon läuft ebenfalls im Hintergrund.
Storage Daemon
Der Storage Daemon handelt nach Anforderungen des Director und übernimmt die Daten vom Bareos File Daemon um sie dann inklusive der Attribute auf das angegebene Storagemedium zu sichern. Es können mehrere Storage Daemon in einer Bareos Umgebung existieren, die jedoch alle von einem Director gesteuert werden. Der Storage Daemon läuft im Hintergrund auf dem System, dass den Backupstorage bereit stellt.
Catalog
Der Katalog Service umfasst alle Programme die für die Dateiindexierung und Datenbankvolumen der zu sichernden Dateien zuständig sind. Er erlaubt dem Administrator oder User das schnelle auffinden der gesicherten Dateien um diese dann wiederherzustellen. Damit hebt er sich von einfachen Sicherungen wie mit tar oder bru ab, da er alle Einträge von allen Volumes, alle Jobs und alle gesicherten Dateien, effizient verwaltet.
Upgrade from 15.2 to 16.2¶
Console/Profile changes
The Bareos WebUI Director profile shipped with Bareos 15.2 ( in the file ) is not sufficient to use the Bareos WebUI 16.2. This has several reasons:
- The handling of Acl`s is more strict in Bareos 16.2 than it has been in Bareos 15.2. Substring matching is no longer enabled, therefore you need to change :bcommand:.bvfs_*` to .bvfs_.* in your to have a proper regular expression. Otherwise the restore module won’t work any longer, especially the file browser.
- The Bareos WebUI 16.2 uses following additional commands:
- .help
- .schedule
- .pools
- import
- export
- update
- release
- enable
- disable
If you used an unmodified file, the easiest way is to overwrite it with the new profile file . The new allows all commands, except of the dangerous ones, see .
directors.ini
Since Version >= 16.2.0 it is possible to work with different catalogs. Therefore the catalog parameter has been introduced. If you don’t set a catalog explicitly the default will be used. Please see for more details.
Additional information¶
NGINX
If you prefer to use Bareos WebUI on Nginx with php5-fpm instead of Apache, a basic working configuration could look like this:
bareos-webui on nginx
server { listen 9100; server_name bareos; root /var/www/bareos-webui/public; location / { index index.php; try_files $uri $uri/ /index.php?$query_string; } location ~ .php$ { include snippets/fastcgi-php.conf; # php5-cgi alone: # pass the PHP # scripts to FastCGI server # listening on 127.0.0.1:9000 #fastcgi_pass 127.0.0.1:9000; # php5-fpm: fastcgi_pass unix:/var/run/php5-fpm.sock; # APPLICATION_ENV: set to 'development' or 'production' #fastcgi_param APPLICATION_ENV development; fastcgi_param APPLICATION_ENV production; } }
This will make the Bareos WebUI accessible at http://bareos:9100/ (assuming your DNS resolve the hostname bareos to the NGINX server).
move
The new move command allows to move volumes between slots without having to leave the bconsole.
To move a volume from slot 32 to slots 33, use:
*move storage=TandbergT40 srcslots=32 dstslots=33 Connecting to Storage daemon TandbergT40 at bareos:9103 ... 3306 Issuing autochanger "slots" command. Device "Drive-1" has 39 slots. Connecting to Storage daemon TandbergT40 at bareos:9103 ... 3306 Issuing autochanger "listall" command. Connecting to Storage daemon TandbergT40 at bareos:9103 ... 3306 Issuing autochanger transfer command. 3308 Successfully transfered volume from slot 32 to 33.
Описание пакетов
Имя пакета | Описание |
---|---|
AUR | Общие файлы для пакетов bareos |
AUR | Admin Tool (CLI) |
AUR | Общие абстракции библиотеки и инструменты для баз SQL |
AUR | Библиотеки и инструменты для варианта использования базы MySQL |
AUR | Библиотеки и инструменты для варианта использования базы postgresql |
AUR | Библиотеки и инструменты для варианта использования базы sqlite3 |
AUR | CLI инструменты с зависимостями баз данных (dbcheck, bscan) |
AUR | Заголовки Devel |
AUR | Director (DIR), главный демон отвечающий за все выполняемые операции (управляет операциями резервного копирования и восстановления, выполняемыми демонами File и Storage.) |
AUR | Python плагин для director-демона |
AUR | Python плагин для файлового демона |
AUR | Файловый демон (устанавливается на клиентской части) |
AUR | Storage Daemon (SD): программное обеспечение, которое выполняет операции чтения и записи на устройствах хранения, используемых для резервного копирования. |
AUR | Поддержка FIFO для демона хранилища |
AUR | Python плагин для демона хранения |
AUR | Поддержка лентовых хранилищ |
AUR | CLI инструменты (bcopy, bextract, bls, bregeq, bwild) |
AUR | Webui (веб-интерфейс администрирования Bareos) |
Selecting Files by Filename¶
If you have a small number of files to restore, and you know the filenames, you can either put the list of filenames in a file to be read by Bareos, or you can enter the names one at a time. The filenames must include the full path and filename. No wild cards are used.
To enter the files, after the restore, you select item number 7 from the prompt list:
restore list of files
* restore First you select one or more JobIds that contain files to be restored. You will be presented several methods of specifying the JobIds. Then you will be allowed to select which files from those JobIds are to be restored. To select the JobIds, you have the following choices: 1: List last 20 Jobs run 2: List Jobs where a given File is saved 3: Enter list of comma separated JobIds to select 4: Enter SQL list command 5: Select the most recent backup for a client 6: Select backup for a client before a specified time 7: Enter a list of files to restore 8: Enter a list of files to restore before a specified time 9: Find the JobIds of the most recent backup for a client 10: Find the JobIds for a backup for a client before a specified time 11: Enter a list of directories to restore for found JobIds 12: Select full restore to a specified Job date 13: Cancel Select item: (1-13): 7
which then prompts you for the client name:
Defined Clients 1 client1 2 Tibs 3 Rufus Select the Client (1-3): 3
Of course, your client list will be different, and if you have only one client, it will be automatically selected. And finally, Bareos requests you to enter a filename:
Enter filename
At this point, you can enter the full path and filename
Enter filename etcresolv.conf Enter filename
as you can see, it took the filename. If Bareos cannot find a copy of the file, it prints the following:
Enter filename junk filename No database record found for junk filename Enter filename
If you want Bareos to read the filenames from a file, you simply precede the filename with a less-than symbol (<).
It is possible to automate the selection by file by putting your list of files in say /tmp/file-list, then using the following command:
restore client=client1 file=</tmpfile-list