Skip to main content

Virtual Filesystem showing Bareos information.

Project description

Virtual Filesystem Showing Bareos Information

Usage

# bareos-fuse.py --help

Bareos Fuse filesystem: displays files from Bareos backups as a (userspace) filesystem.

bareos-fuse.py [mountpoint] [options]

Options:
  -h, --help             show this help message and exit
  -o opt,[opt...]        mount options
  -o address=BAREOS_DIRECTOR
                         address of the Bareos Director to connect [default:
                         "localhost"]
  -o port=PORT           address of the Bareos Director to connect [default:
                         "9101"]
  -o dirname=NAME        name of the Bareos Director to connect [default:
                         ""]
  -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

show job list

# ls -la /mnt/jobs/all/
drwxr-xr-x  5 root root 4096 Apr 23 22:12 jobid=128_level=F_status=T
drwxr-xr-x  5 root root 4096 Apr 23 22:12 jobid=129_level=F_status=T
drwxr-xr-x  5 root root 4096 Apr 23 22:15 jobid=131_level=F_status=T
drwxr-xr-x  5 root root 4096 Apr 23 22:12 jobid=133_level=F_status=T
drwxr-xr-x  5 root root 4096 Apr 23 22:17 jobid=135_level=F_status=T
drwxr-xr-x  5 root root 4096 Apr 23 22:18 jobid=137_level=F_status=T
drwxr-xr-x  5 root root 4096 Apr 23 22:15 jobid=139_level=F_status=T
drwxr-xr-x  5 root root 4096 Apr 23 22:17 jobid=141_level=F_status=T
...

show volumes, including size and status

# ls -la /mnt/volumes/
drwxr-xr-x  5 root root       4096 Jan  1  1970 Full-0001
-r--r-----  1 root root 1073693339 Sep 18 09:00 Full-0001=Full
drwxr-xr-x  5 root root       4096 Jan  1  1970 Full-0002
-r--r-----  1 root root 1073678209 Sep 18 15:00 Full-0002=Full
drwxr-xr-x  5 root root       4096 Jan  1  1970 Full-0003
-r--r-----  1 root root 1073685404 Sep 18 18:00 Full-0003=Full
drwxr-xr-x  5 root root       4096 Jan  1  1970 Full-0004
-r--r-----  1 root root 1073728529 Sep 19 12:00 Full-0004=Full
drwxr-xr-x  5 root root       4096 Jan  1  1970 Full-0005
-r--r-----  1 root root 1073709366 Sep 19 18:00 Full-0005=Full
drwxr-xr-x  5 root root       4096 Jan  1  1970 Full-0006
-r--r-----  1 root root 1073729642 Sep 20 15:00 Full-0006=Full
drwxr-xr-x  5 root root       4096 Jan  1  1970 Full-0007
-r--r-----  1 root root 1073702045 Sep 20 18:00 Full-0007=Full
drwxr-xr-x  5 root root       4096 Jan  1  1970 Full-0008
-r--r-----  1 root root 1073712528 Sep 21 12:00 Full-0008=Full
drwxr-xr-x  5 root root       4096 Jan  1  1970 Full-0009
-r--r-----  1 root root 1073684834 Sep 21 15:00 Full-0009=Full
drwxr-xr-x  5 root root       4096 Jan  1  1970 Full-0010
-rw-rw----  1 root root  732319090 Sep 22 15:00 Full-0010=Append

show content (files/directories) off a backup

# ls -la /mnt/clients/client1-fd/backups/jobid\=887_level\=F_status\=T/data/
...

restore files from a backup job

Triggering restore is implemented using Extended Attributes. This prevents, that a normal read access triggers a restore job. To trigger a restore, set the extended attribute user.bareos.do of a file or directory to restore.

Note:
  • the mount parameter restoreclient is required for this operation. Otherwise you get a EPERM error.

  • the mount parameter restorejob is required, if you have more then one restore job defined.

Example for restoring all files of a full backup job:

# cd /mnt/clients/client1-fd/backups/jobid\=887_level\=F_status\=T/data/
# getfattr -d .
user.bareos.do
user.bareos.do_options="mark | restore"
user.bareos.restored="no"
user.bareos.restorepath="/var/cache/bareosfs//jobid=887"
# setfattr -n user.bareos.do -v restore .
# getfattr -d .
user.bareos.do="restore"
user.bareos.do_options="mark | restore"
user.bareos.restore_job_id="913"
user.bareos.restored="yes"
user.bareos.restorepath="//var/cache/bareosfs//jobid=887"

Files are now readable and links show there destination.

Instead of restoring all files and directories from the backup, you can set the “restore” value on individual files. Each set will trigger a separate restore job.

Alternative: mount command

The baroes-fuse packages do also contain the mount.bareosfs link. Using this, the normal mount command can be used:

mount -t bareosfs -o address=localhost,password=secret,logfile=/var/log/bareosfs.log fuse /mnt

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bareos-fuse-0.3.tar.gz (15.4 kB view details)

Uploaded Source

Built Distribution

bareos_fuse-0.3-py3-none-any.whl (34.6 kB view details)

Uploaded Python 3

File details

Details for the file bareos-fuse-0.3.tar.gz.

File metadata

  • Download URL: bareos-fuse-0.3.tar.gz
  • Upload date:
  • Size: 15.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.4.0 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.7.7

File hashes

Hashes for bareos-fuse-0.3.tar.gz
Algorithm Hash digest
SHA256 617e37282feaeb695cc91c7b380b33f7762aee69a0f618571d4509752f4aff7e
MD5 c8da790f3f0601319829f46a6d1eb303
BLAKE2b-256 d7afa02f67882020055ce55c3d375e394568c7febbc39ba4032d9a56fd5ba562

See more details on using hashes here.

File details

Details for the file bareos_fuse-0.3-py3-none-any.whl.

File metadata

  • Download URL: bareos_fuse-0.3-py3-none-any.whl
  • Upload date:
  • Size: 34.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.4.0 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.7.7

File hashes

Hashes for bareos_fuse-0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 e08a90662ebf30d0034170ce648ae6ece7f57475cc1503ffd5583ffbe5c5bd4f
MD5 9a364f0dcf8f39459695d29a69b59a1a
BLAKE2b-256 1eb15bbfcfe19e930a3777d0dac76e9ebcf453510ddd9493642aa29e1adcd890

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page