]> git.proxmox.com Git - proxmox-backup.git/log
proxmox-backup.git
3 years agotape: remove MediaLabelInfo, use MediaId instead
Dietmar Maurer [Wed, 16 Dec 2020 12:27:53 +0000 (13:27 +0100)]
tape: remove MediaLabelInfo, use MediaId instead

The additional content_uuid was quite useless...

3 years agoupdate pxar dependency to 0.6.2
Thomas Lamprecht [Wed, 16 Dec 2020 12:13:31 +0000 (13:13 +0100)]
update pxar dependency to 0.6.2

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agotape: improve docu
Dietmar Maurer [Wed, 16 Dec 2020 11:43:51 +0000 (12:43 +0100)]
tape: improve docu

3 years agotape: improve docu
Dietmar Maurer [Wed, 16 Dec 2020 11:23:52 +0000 (12:23 +0100)]
tape: improve docu

3 years agotape: add chunk archive reader/writer
Dietmar Maurer [Wed, 16 Dec 2020 11:08:34 +0000 (12:08 +0100)]
tape: add chunk archive reader/writer

3 years agotape: cleanup MediaLocation type for direct use with API
Dietmar Maurer [Wed, 16 Dec 2020 09:45:58 +0000 (10:45 +0100)]
tape: cleanup MediaLocation type for direct use with API

3 years agodocs: prune-sim: folluwp: add missing semicolon
Thomas Lamprecht [Wed, 16 Dec 2020 09:08:08 +0000 (10:08 +0100)]
docs: prune-sim: folluwp: add missing semicolon

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agotape: add magic number to identify media catalog files
Dietmar Maurer [Wed, 16 Dec 2020 07:59:27 +0000 (08:59 +0100)]
tape: add magic number to identify media catalog files

3 years agoprune sim: correctly keep track of already included backups
Fabian Ebner [Mon, 14 Dec 2020 15:04:53 +0000 (15:04 +0000)]
prune sim: correctly keep track of already included backups

This needs to happen in a separate loop, because some time intervals are not
subsets of others, i.e. weeks and months. Previously, with a daily backup
schedule, having:
* a backup on Sun, 06 Dec 2020 kept by keep-daily
* a backup on Sun, 29 Nov 2020 kept by keep-weekly
would lead to the backup on Mon, 30 Nov 2020 to be selected for keep-monthly,
because the iteration did not yet reach the backup on Sun, 29 Nov 2020 that
would mark November as being covered.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
3 years agofollowup: use arrow function for sorting
Thomas Lamprecht [Tue, 15 Dec 2020 12:45:36 +0000 (13:45 +0100)]
followup: use arrow function for sorting

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoprune sim: fix #3192: by fixing usage of sort()
Fabian Ebner [Tue, 15 Dec 2020 12:01:33 +0000 (13:01 +0100)]
prune sim: fix #3192: by fixing usage of sort()

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
3 years agotape: add MediaCatalog implementation
Dietmar Maurer [Tue, 15 Dec 2020 12:13:44 +0000 (13:13 +0100)]
tape: add MediaCatalog implementation

3 years agotape: rename DriveLabel to MediaLabel
Dietmar Maurer [Mon, 14 Dec 2020 16:37:16 +0000 (17:37 +0100)]
tape: rename DriveLabel to MediaLabel

3 years agotape: improve file format docu
Dietmar Maurer [Mon, 14 Dec 2020 16:29:57 +0000 (17:29 +0100)]
tape: improve file format docu

3 years agotape: minor code cleanup
Dietmar Maurer [Mon, 14 Dec 2020 15:56:26 +0000 (16:56 +0100)]
tape: minor code cleanup

3 years agotape: scan - print more debug info
Dietmar Maurer [Mon, 14 Dec 2020 12:16:18 +0000 (13:16 +0100)]
tape: scan - print more debug info

3 years agotape: implement scan command (useful for debug)
Dietmar Maurer [Mon, 14 Dec 2020 11:55:49 +0000 (12:55 +0100)]
tape: implement scan command (useful for debug)

3 years agotape: implement eod cli command (debug tool)
Dietmar Maurer [Mon, 14 Dec 2020 08:56:59 +0000 (09:56 +0100)]
tape: implement eod cli command (debug tool)

3 years agotape: rename cli 'media media-destroy' toö 'media destroy'
Dietmar Maurer [Mon, 14 Dec 2020 08:30:32 +0000 (09:30 +0100)]
tape: rename cli 'media media-destroy' toö 'media destroy'

3 years agotape: implement destroy_media
Dietmar Maurer [Mon, 14 Dec 2020 07:58:40 +0000 (08:58 +0100)]
tape: implement destroy_media

3 years agotape: add media api
Dietmar Maurer [Mon, 14 Dec 2020 06:55:57 +0000 (07:55 +0100)]
tape: add media api

3 years agotape: make changer get_status async
Dietmar Maurer [Mon, 14 Dec 2020 06:14:24 +0000 (07:14 +0100)]
tape: make changer get_status async

3 years agotape: split api type definitions for changers into extra file
Dietmar Maurer [Sun, 13 Dec 2020 08:31:02 +0000 (09:31 +0100)]
tape: split api type definitions for changers into extra file

3 years agotape: rename CHANGER_ID_SCHEMA to CHANGER_NAME_SCHEMA
Dietmar Maurer [Sun, 13 Dec 2020 08:22:08 +0000 (09:22 +0100)]
tape: rename CHANGER_ID_SCHEMA to CHANGER_NAME_SCHEMA

3 years agotape: rename DRIVE_ID_SCHEMA to DRIVE_NAME_SCHEMA
Dietmar Maurer [Sun, 13 Dec 2020 08:18:16 +0000 (09:18 +0100)]
tape: rename DRIVE_ID_SCHEMA to DRIVE_NAME_SCHEMA

3 years agotape: correctly call Async handler in proxmox-tape
Dietmar Maurer [Sat, 12 Dec 2020 08:58:47 +0000 (09:58 +0100)]
tape: correctly call Async handler in proxmox-tape

3 years agotape: avoid executor blocking in changer api
Dietmar Maurer [Sat, 12 Dec 2020 08:45:08 +0000 (09:45 +0100)]
tape: avoid executor blocking in changer api

3 years agotape: avoid executor blocking in drive API
Dietmar Maurer [Sat, 12 Dec 2020 08:20:04 +0000 (09:20 +0100)]
tape: avoid executor blocking in drive API

By using tokio::task::spawn_blocking().

3 years agobump version to 1.0.6-1 v1.0.6
Thomas Lamprecht [Fri, 11 Dec 2020 11:58:14 +0000 (12:58 +0100)]
bump version to 1.0.6-1

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agodebian: just install whole images directory
Thomas Lamprecht [Fri, 11 Dec 2020 13:18:37 +0000 (14:18 +0100)]
debian: just install whole images directory

fixes build for recently added tape icon (and includes it for real)

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agotape: add svg icon
Dietmar Maurer [Fri, 11 Dec 2020 12:02:23 +0000 (13:02 +0100)]
tape: add svg icon

3 years agotape: use WorkerTask for erase and rewind
Dietmar Maurer [Fri, 11 Dec 2020 10:15:58 +0000 (11:15 +0100)]
tape: use WorkerTask for erase and rewind

3 years agotape: split inventory api
Dietmar Maurer [Fri, 11 Dec 2020 09:42:29 +0000 (10:42 +0100)]
tape: split inventory api

inventory: sync, list labels with uuids,
update_inventory: WorkerTask, updates database

3 years agotape: run label commands as WorkerTask (threads)
Dietmar Maurer [Fri, 11 Dec 2020 08:10:22 +0000 (09:10 +0100)]
tape: run label commands as WorkerTask (threads)

3 years agotape: implement barcode-label-mdedia
Dietmar Maurer [Fri, 11 Dec 2020 06:50:19 +0000 (07:50 +0100)]
tape: implement barcode-label-mdedia

3 years agotape: implement inventory command
Dietmar Maurer [Fri, 11 Dec 2020 06:39:28 +0000 (07:39 +0100)]
tape: implement inventory command

3 years agodepend on package mt-st
Dietmar Maurer [Fri, 11 Dec 2020 05:38:45 +0000 (06:38 +0100)]
depend on package mt-st

We do not use the mt utility directly, but the package also provides
an udev helper to correctly initialize tape drives (stinit). Also,
the mt utility is helpful for debugging tap issues.

3 years agocontrol.in: fix indentation
Oguz Bektas [Thu, 10 Dec 2020 15:42:09 +0000 (16:42 +0100)]
control.in: fix indentation

Signed-off-by: Oguz Bektas <o.bektas@proxmox.com>
3 years agofix build: add missing file
Dietmar Maurer [Thu, 10 Dec 2020 12:40:20 +0000 (13:40 +0100)]
fix build: add missing file

3 years agotape: implement read-label command
Dietmar Maurer [Thu, 10 Dec 2020 12:20:39 +0000 (13:20 +0100)]
tape: implement read-label command

3 years agotape: implement label command
Dietmar Maurer [Thu, 10 Dec 2020 11:30:27 +0000 (12:30 +0100)]
tape: implement label command

3 years agotape: add media pool handling
Dietmar Maurer [Thu, 10 Dec 2020 10:41:35 +0000 (11:41 +0100)]
tape: add media pool handling

3 years agotape: add media pool cli
Dietmar Maurer [Thu, 10 Dec 2020 10:08:29 +0000 (11:08 +0100)]
tape: add media pool cli

3 years agotape: add media pool config api
Dietmar Maurer [Thu, 10 Dec 2020 09:52:27 +0000 (10:52 +0100)]
tape: add media pool config api

3 years agotape: correctly sort drive api subdir
Dietmar Maurer [Thu, 10 Dec 2020 09:09:12 +0000 (10:09 +0100)]
tape: correctly sort drive api subdir

3 years agotape: implement option changer-drive-id
Dietmar Maurer [Thu, 10 Dec 2020 08:09:06 +0000 (09:09 +0100)]
tape: implement option changer-drive-id

3 years agotape: cli cleanup - avoid api redefinition
Dietmar Maurer [Thu, 10 Dec 2020 07:35:11 +0000 (08:35 +0100)]
tape: cli cleanup - avoid api redefinition

3 years agotape: implement delete property for drive update command
Dietmar Maurer [Thu, 10 Dec 2020 07:25:46 +0000 (08:25 +0100)]
tape: implement delete property for drive update command

3 years agotape: cleanup load-slot api
Dietmar Maurer [Thu, 10 Dec 2020 07:04:55 +0000 (08:04 +0100)]
tape: cleanup load-slot api

3 years agotape: cli cleanup - rename scana-for-* into scan
Dietmar Maurer [Thu, 10 Dec 2020 06:58:45 +0000 (07:58 +0100)]
tape: cli cleanup - rename scana-for-* into scan

3 years agotape: implement load-media command
Dietmar Maurer [Thu, 10 Dec 2020 06:52:56 +0000 (07:52 +0100)]
tape: implement load-media command

3 years agotape: implement eject
Dietmar Maurer [Wed, 9 Dec 2020 16:50:48 +0000 (17:50 +0100)]
tape: implement eject

3 years agotape: implement rewind
Dietmar Maurer [Wed, 9 Dec 2020 16:43:38 +0000 (17:43 +0100)]
tape: implement rewind

3 years agotape: implement erase media
Dietmar Maurer [Wed, 9 Dec 2020 16:35:31 +0000 (17:35 +0100)]
tape: implement erase media

3 years agotape: add command line interface proxmox-tape
Dietmar Maurer [Wed, 9 Dec 2020 11:58:43 +0000 (12:58 +0100)]
tape: add command line interface proxmox-tape

3 years agotape: do not remove changer while still used
Dietmar Maurer [Wed, 9 Dec 2020 11:55:54 +0000 (12:55 +0100)]
tape: do not remove changer while still used

3 years agotape: add changer property to drive create api
Dietmar Maurer [Wed, 9 Dec 2020 11:55:10 +0000 (12:55 +0100)]
tape: add changer property to drive create api

3 years agotape: set protected flag for configuration change api methods
Dietmar Maurer [Wed, 9 Dec 2020 11:02:55 +0000 (12:02 +0100)]
tape: set protected flag for configuration change api methods

3 years agoclient: move connect_to_localhost into client module
Dietmar Maurer [Wed, 9 Dec 2020 10:59:50 +0000 (11:59 +0100)]
client: move connect_to_localhost into client module

3 years agotape: add media state database
Dietmar Maurer [Wed, 9 Dec 2020 09:16:01 +0000 (10:16 +0100)]
tape: add media state database

3 years agoupdate control file
Dietmar Maurer [Wed, 9 Dec 2020 10:19:50 +0000 (11:19 +0100)]
update control file

3 years agoremove unused descriptions from api macros
Wolfgang Bumiller [Wed, 9 Dec 2020 09:54:38 +0000 (10:54 +0100)]
remove unused descriptions from api macros

these are now a hard error in the api macro

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agotape: expose basic tape/changer functionality at api2/tape/
Dietmar Maurer [Tue, 8 Dec 2020 14:42:50 +0000 (15:42 +0100)]
tape: expose basic tape/changer functionality at api2/tape/

3 years agotape: check digest on config update
Dietmar Maurer [Tue, 8 Dec 2020 10:24:38 +0000 (11:24 +0100)]
tape: check digest on config update

3 years agotape: add changer configuration API
Dietmar Maurer [Tue, 8 Dec 2020 08:04:56 +0000 (09:04 +0100)]
tape: add changer configuration API

3 years agotape: add tape drive configuration API
Dietmar Maurer [Mon, 7 Dec 2020 12:04:32 +0000 (13:04 +0100)]
tape: add tape drive configuration API

3 years agotape: add tape device driver
Dietmar Maurer [Mon, 7 Dec 2020 07:27:15 +0000 (08:27 +0100)]
tape: add tape device driver

3 years agotape: add BlockeReader/BlockedWriter streams
Dietmar Maurer [Sun, 6 Dec 2020 11:09:55 +0000 (12:09 +0100)]
tape: add BlockeReader/BlockedWriter streams

This is the basic format used to write data to tapes.

3 years agotape: add BlockHeader impl
Dietmar Maurer [Sun, 6 Dec 2020 09:26:24 +0000 (10:26 +0100)]
tape: add BlockHeader impl

3 years agotape: add helpers to emulate tape read/write behavior
Dietmar Maurer [Sun, 6 Dec 2020 08:41:16 +0000 (09:41 +0100)]
tape: add helpers to emulate tape read/write behavior

3 years agofix bug #3189: fix change_password permission checks, run protected
Dietmar Maurer [Sat, 5 Dec 2020 15:20:29 +0000 (16:20 +0100)]
fix bug #3189: fix change_password permission checks, run protected

3 years agodepend on mtx (tape changer control)
Dietmar Maurer [Sat, 5 Dec 2020 13:50:16 +0000 (14:50 +0100)]
depend on mtx (tape changer control)

A very small package with no additional dependencies.

3 years agotape: add tape changer support using 'mtx' command
Dietmar Maurer [Sat, 5 Dec 2020 13:46:57 +0000 (14:46 +0100)]
tape: add tape changer support using 'mtx' command

3 years agotape: add media invenotry
Dietmar Maurer [Sat, 5 Dec 2020 11:53:08 +0000 (12:53 +0100)]
tape: add media invenotry

3 years agotape: define useful constants
Dietmar Maurer [Sat, 5 Dec 2020 11:20:46 +0000 (12:20 +0100)]
tape: define useful constants

3 years agotape: add media pool config
Dietmar Maurer [Sat, 5 Dec 2020 10:59:38 +0000 (11:59 +0100)]
tape: add media pool config

3 years agotape: add tape read trait
Dietmar Maurer [Sat, 5 Dec 2020 09:54:38 +0000 (10:54 +0100)]
tape: add tape read trait

3 years agotape: add tape write trait
Dietmar Maurer [Sat, 5 Dec 2020 09:51:34 +0000 (10:51 +0100)]
tape: add tape write trait

3 years agotape: add file format definitions
Dietmar Maurer [Sat, 5 Dec 2020 09:45:08 +0000 (10:45 +0100)]
tape: add file format definitions

3 years agocommit missing file: tape api type definitions
Dietmar Maurer [Fri, 4 Dec 2020 15:00:16 +0000 (16:00 +0100)]
commit missing file: tape api type definitions

3 years agotape support: add drive configuration
Dietmar Maurer [Fri, 4 Dec 2020 14:42:32 +0000 (15:42 +0100)]
tape support: add drive configuration

3 years agostart experimental tape management GUI
Dietmar Maurer [Fri, 4 Dec 2020 11:50:08 +0000 (12:50 +0100)]
start experimental tape management GUI

You need to set the environment TEST_TAPE_GUI=1 to enable this.
The current GUI is only a placeholder.

3 years agobackup/datastore: move manifest locking to /run
Dominik Csapak [Wed, 2 Dec 2020 14:55:19 +0000 (15:55 +0100)]
backup/datastore: move manifest locking to /run

this fixes the issue that on some filesystems, you cannot recursively
remove a directory when you hold a lock on a file inside (e.g. nfs/cifs)

it is not really backwards compatible (so during an upgrade, there
could be two daemons have the lock), but since the locking was
broken before (see previous patch) it should not really matter
(also it seems very unlikely that someone will trigger this)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agobackup/datastore: really lock manifest on delete
Dominik Csapak [Wed, 2 Dec 2020 13:19:56 +0000 (14:19 +0100)]
backup/datastore: really lock manifest on delete

'lock_manifest' returns a Result<File, Error> so we always got the result,
even when we did not get the lock, but we acted like we had.

bubble the locking error up

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoclient/pull: log how many groups to pull were found
Dominik Csapak [Tue, 1 Dec 2020 14:01:48 +0000 (15:01 +0100)]
client/pull: log how many groups to pull were found

if no groups were found, the task log was very confusing as it
contained no real information why nothing was synced, e.g.:

 Starting datastore sync job 'remote:datastore:local-datastore:s-79412799-e6ee'
 Sync datastore 'local-datastore' from 'remote/datastore'
 sync job 'remote:datastore:local-datastore:s-79412799-e6ee' end
 TASK OK

this patch simply logs how many groups were found and are about to be synced:

 Starting datastore sync job 'remote:datastore:local-datastore:s-79412799-e6ee'
 Sync datastore 'local-datastore' from 'remote/datastore'
 found 0 groups to sync
 sync job 'remote:datastore:local-datastore:s-79412799-e6ee' end
 TASK OK

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agodocs: add more thoughts about chunk size
Dietmar Maurer [Tue, 1 Dec 2020 09:28:06 +0000 (10:28 +0100)]
docs: add more thoughts about chunk size

3 years agodoc: add some thoughts about large chunk sizes
Dietmar Maurer [Tue, 1 Dec 2020 07:47:15 +0000 (08:47 +0100)]
doc: add some thoughts about large chunk sizes

3 years agocleanup: use extra file for StoreProgress
Dietmar Maurer [Tue, 1 Dec 2020 05:34:33 +0000 (06:34 +0100)]
cleanup: use extra file for StoreProgress

3 years agocleanup: remove unnecessary StoreProgress clone()
Dietmar Maurer [Tue, 1 Dec 2020 05:29:11 +0000 (06:29 +0100)]
cleanup: remove unnecessary StoreProgress clone()

3 years agoverify: use same progress as pull
Fabian Grünbichler [Mon, 30 Nov 2020 15:27:21 +0000 (16:27 +0100)]
verify: use same progress as pull

percentage of verified groups, interpolating based on snapshot count
within the group. in most cases, this will also be closer to 'real'
progress since added snapshots (those which will be verified) in active
backup groups will be roughly evenly distributed, while number of total
snapshots per group will be heavily skewed towards those groups which
have existed the longest, even though most of those old snapshots will
only be re-verified very infrequently.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
3 years agoprogress: add format variants
Fabian Grünbichler [Mon, 30 Nov 2020 15:27:20 +0000 (16:27 +0100)]
progress: add format variants

for iterating over a single group, or iterating just on the group level

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
3 years agopull: factor out interpolated progress
Fabian Grünbichler [Mon, 30 Nov 2020 15:27:19 +0000 (16:27 +0100)]
pull: factor out interpolated progress

and add group/snapshot count info.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
3 years agoremove BackupGroup::list_groups
Fabian Grünbichler [Mon, 30 Nov 2020 15:27:18 +0000 (16:27 +0100)]
remove BackupGroup::list_groups

BackupInfo::list_backup_groups is identical code-wise, and makes more
sense as entry point for listing groups.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
3 years agogc: don't limit index listing to same filesystem
Fabian Grünbichler [Mon, 30 Nov 2020 15:22:20 +0000 (16:22 +0100)]
gc: don't limit index listing to same filesystem

WalkDir does not follow symlinks by default anyway, and this behaviour
is not documented anywhere. e.g., if a sysadmin mounts 'extra storage'
for some backup group or type (not knowing that only metadata is stored
in those directories), GC will ignore all the indices contained within
and happily garbage collect their chunks..

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
3 years agogc: remove duplicate variable
Fabian Grünbichler [Mon, 30 Nov 2020 15:22:19 +0000 (16:22 +0100)]
gc: remove duplicate variable

list_images already returns absolute paths, we don't need to prepend
anything.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
3 years agogc: log index files found outside of expected scheme
Fabian Grünbichler [Mon, 30 Nov 2020 15:22:18 +0000 (16:22 +0100)]
gc: log index files found outside of expected scheme

for safety reason, GC finds and marks all index files below the
datastore base path. as a result of regular operations, only index files
within the expected scheme of <TYPE>/<ID>/<TIMESTAMP> should exist.

add a small check + warning if the index list contains index files out
side of this expected scheme, so that an admin with shell access can
investigate.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
3 years agogc: shorten progress messages
Fabian Grünbichler [Mon, 30 Nov 2020 15:22:17 +0000 (16:22 +0100)]
gc: shorten progress messages

we have messages starting the phases anyway, and limit the number of
progress updates so that context remains available at all times.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
3 years agod/control bump
Wolfgang Bumiller [Mon, 30 Nov 2020 13:28:02 +0000 (14:28 +0100)]
d/control bump

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agofile logger: remove test.log after test as well
Wolfgang Bumiller [Mon, 30 Nov 2020 13:13:21 +0000 (14:13 +0100)]
file logger: remove test.log after test as well

and a doc formatting fixup

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agoderive PartialEq for Userid
Wolfgang Bumiller [Mon, 30 Nov 2020 13:08:57 +0000 (14:08 +0100)]
derive PartialEq for Userid

the manual implementation is equivalent

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>