]>
git.proxmox.com Git - proxmox-backup.git/log
Dietmar Maurer [Mon, 12 Aug 2019 08:16:42 +0000 (10:16 +0200)]
src/backup/data_blob.rs - DataBlobWriter: impl. compressed encrypted blobs
Dietmar Maurer [Mon, 12 Aug 2019 08:08:00 +0000 (10:08 +0200)]
src/backup/data_blob.rs - DataBlobWriter: impl. encrypted blobs
Dietmar Maurer [Mon, 12 Aug 2019 08:06:51 +0000 (10:06 +0200)]
src/backup/crypt_config.rs: new helper data_crypter to get openssl Crypter
Dietmar Maurer [Mon, 12 Aug 2019 07:01:08 +0000 (09:01 +0200)]
src/backup/data_blob.rs - DataBlobWriter: impl. compressed signed blobs
Dietmar Maurer [Mon, 12 Aug 2019 06:53:53 +0000 (08:53 +0200)]
src/backup/data_blob.rs: impl. ChecksumWriter
To correctly compute crc,hmac of final data.
Dietmar Maurer [Mon, 12 Aug 2019 05:34:41 +0000 (07:34 +0200)]
src/backup/data_blob.rs: impl. DataBlobWriter for authenticated blobs
Dietmar Maurer [Mon, 12 Aug 2019 05:33:15 +0000 (07:33 +0200)]
src/backup/crypt_config.rs: new method to get hmac signer
Dietmar Maurer [Sun, 11 Aug 2019 10:07:37 +0000 (12:07 +0200)]
src/backup/data_blob.rs: make DataBlobWriter more generic
Allow to write compressed and uncompressed blobs.
Dietmar Maurer [Sun, 11 Aug 2019 09:32:36 +0000 (11:32 +0200)]
src/backup/data_blob.rs: impl. simple reader/writer
To avoid loading blob into memory.
Dietmar Maurer [Sat, 10 Aug 2019 07:12:17 +0000 (09:12 +0200)]
src/bin/proxmox-backup-client.rs: implement login/logout
Christian Ebner [Thu, 8 Aug 2019 10:49:20 +0000 (12:49 +0200)]
pxar: add command 'mount' to cli of pxar
Allows to mount an archive to a specified mountpoint via the cli.
Once the archive is mounted, the process is send to the background.
By passing the --verbose flag, the process is kept in foreground and
debug output is provided.
Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
Dietmar Maurer [Fri, 9 Aug 2019 14:45:13 +0000 (16:45 +0200)]
pxar: add fuse module and expose its pub functionality.
Christian Ebner [Thu, 8 Aug 2019 10:49:18 +0000 (12:49 +0200)]
pxar: add basic code for FUSE implementation.
This adds the basic code in order to create a fuse session and mount an archive.
It adds libfuse3-3 as runtime dependency and libfuse3-dev as build dependency.
Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
Dietmar Maurer [Fri, 9 Aug 2019 09:49:06 +0000 (11:49 +0200)]
src/backup/data_blob.rs: define const MAX_BLOB_SIZE
Dietmar Maurer [Fri, 9 Aug 2019 09:34:47 +0000 (11:34 +0200)]
src/bin/proxmox-backup-client.rs: implement catalog command
Dietmar Maurer [Fri, 9 Aug 2019 09:03:24 +0000 (11:03 +0200)]
src/bin/proxmox-backup-client.rs: add archive filename to catalog
Dietmar Maurer [Fri, 9 Aug 2019 08:22:56 +0000 (10:22 +0200)]
src/backup/data_blob.rs: allow largert blob sizes (128MB)
Need this for catalog files.
Dietmar Maurer [Fri, 9 Aug 2019 08:22:32 +0000 (10:22 +0200)]
src/bin/proxmox-backup-client.rs: avoid compiler warning
Dietmar Maurer [Fri, 9 Aug 2019 08:08:45 +0000 (10:08 +0200)]
src/bin/proxmox-backup-client.rs: new completion helper for snapshots
Dietmar Maurer [Fri, 9 Aug 2019 07:46:49 +0000 (09:46 +0200)]
src/pxar/encoder.rs: use BackupCatalogWriter
Dietmar Maurer [Fri, 9 Aug 2019 06:11:32 +0000 (08:11 +0200)]
src/pxar/catalog.rs: new catalog helper
Dietmar Maurer [Wed, 7 Aug 2019 08:23:08 +0000 (10:23 +0200)]
src/bin/proxmox-backup-client.rs: avoid doubled file extensions (.blob.blob) in index.json
Dietmar Maurer [Wed, 7 Aug 2019 08:10:14 +0000 (10:10 +0200)]
api: always use complete file names (including add exctensions)
Dietmar Maurer [Wed, 7 Aug 2019 07:16:14 +0000 (09:16 +0200)]
src/api2/admin/datastore.rs - list_snapshot_files: list all files
Add files that are not mentioned in index.json.
Dietmar Maurer [Wed, 7 Aug 2019 07:15:13 +0000 (09:15 +0200)]
src/api2/backup/environment.rs - add_blob: always verify blob crc
Dietmar Maurer [Wed, 7 Aug 2019 06:29:38 +0000 (08:29 +0200)]
src/backup/data_blob.rs - encode: always compute crc
Dietmar Maurer [Wed, 7 Aug 2019 06:27:52 +0000 (08:27 +0200)]
src/backup/backup_info.rs: add BackupInfo::new constructor
Dietmar Maurer [Wed, 7 Aug 2019 04:48:18 +0000 (06:48 +0200)]
src/bin/proxmox-backup-client.rs: fix remote filename completion
Dietmar Maurer [Tue, 6 Aug 2019 10:23:06 +0000 (12:23 +0200)]
src/client/http_client.rs: compute checksums for chunk streams
Dietmar Maurer [Tue, 6 Aug 2019 09:46:15 +0000 (11:46 +0200)]
src/client/http_client.rs: minor code cleanup
Dietmar Maurer [Tue, 6 Aug 2019 09:42:14 +0000 (11:42 +0200)]
src/backup/data_blob.rs: always compute crc
Dietmar Maurer [Tue, 6 Aug 2019 09:26:06 +0000 (11:26 +0200)]
src/client/http_client.rs: compute file checksums
Dietmar Maurer [Tue, 6 Aug 2019 08:56:21 +0000 (10:56 +0200)]
src/api2/admin/datastore.rs: extract backup size from index.json
Christian Ebner [Mon, 5 Aug 2019 12:28:21 +0000 (14:28 +0200)]
pxar: add initial docs for MatchPattern
Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
Christian Ebner [Mon, 5 Aug 2019 12:28:03 +0000 (14:28 +0200)]
pxar: add error handling for MatchPattern::matches_filename()
Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
Dietmar Maurer [Mon, 5 Aug 2019 11:22:19 +0000 (13:22 +0200)]
src/api2/admin/datastore.rs - files: return data from index.json
Dietmar Maurer [Mon, 5 Aug 2019 08:04:12 +0000 (10:04 +0200)]
tests/worker-task-abort.rs: use proxmox::tools::try_block
Dietmar Maurer [Sat, 3 Aug 2019 15:06:23 +0000 (17:06 +0200)]
use new proxmox::tools::nodename
Dietmar Maurer [Sat, 3 Aug 2019 14:44:31 +0000 (16:44 +0200)]
remove src/tools/common_regex.rs, use proxmox::tools::common_regex instead
Dietmar Maurer [Sat, 3 Aug 2019 14:26:44 +0000 (16:26 +0200)]
remove src/tools/procfs.rs, use proxmox::sys::linux::procfs instead
Dietmar Maurer [Sat, 3 Aug 2019 14:11:47 +0000 (16:11 +0200)]
src/tools/vec.rs: remove unused file
We already moved that to proxmox::tools
Dietmar Maurer [Sat, 3 Aug 2019 11:05:38 +0000 (13:05 +0200)]
update to nix 0.14, use code from proxmox:tools
Dietmar Maurer [Sat, 3 Aug 2019 07:28:57 +0000 (09:28 +0200)]
use new proxmox::sys::linux::magic
Christian Ebner [Fri, 2 Aug 2019 15:43:25 +0000 (17:43 +0200)]
pxar: remove flag to change digest algorithm
The flag CA_FORMAT_SHA512_256 is used to switch between sha512 and sha256 to
calculate digest in casync.
As we use sha256, we can get rid of this flag for now.
Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
Christian Ebner [Fri, 2 Aug 2019 15:02:24 +0000 (17:02 +0200)]
pxar: cleanup: refactor and rename exclude pattern
The original name PxarExcludePattern makes no sense anymore as the patterns are
also used to match filenames during restore of the archive.
Therefore, exclude_pattern.rs is moved to match_pattern.rs and PxarExcludePattern
rename to MatchPattern.
Further, since it makes more sense the MatchTypes are now declared as None,
Positive, Negative, PartialPositive or PartialNegative, as this makes more sense
and seems more readable.
Positive matches are those without '!' prefix, Negatives with '!' prefix.
This makes also the filename matching in the encoder/decoder more intuitive and
the logic was adapted accordingly.
Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
Christian Ebner [Fri, 2 Aug 2019 13:19:36 +0000 (15:19 +0200)]
pxar: cleanup: s/PxarDirBuf/PxarDirStack/g and move dir_buffer.rs to dir_stack.rs
Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
Christian Ebner [Fri, 2 Aug 2019 13:19:35 +0000 (15:19 +0200)]
pxar: change uid and gid to u32 instead of u64
Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
Christian Ebner [Fri, 2 Aug 2019 13:19:34 +0000 (15:19 +0200)]
pxar: cleanup: s/CA_FORMAT/PXAR/g and s/CaFormat/Pxar/g
Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
Christian Ebner [Fri, 2 Aug 2019 13:19:33 +0000 (15:19 +0200)]
pxar: cleanup: move feature flags to src/pxar/flags.rs and omit CA_FORMAT prefix on all of them
Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
Christian Ebner [Fri, 2 Aug 2019 13:19:32 +0000 (15:19 +0200)]
pxar: cleanup: move filesystem related magic numbers to tools/fs/magic.rs
Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
Dietmar Maurer [Fri, 2 Aug 2019 08:00:15 +0000 (10:00 +0200)]
src/bin/proxmox-backup-client.rs: sign index.json
Dietmar Maurer [Fri, 2 Aug 2019 07:56:01 +0000 (09:56 +0200)]
src/backup/data_blob.rs: implement signed blobs
Dietmar Maurer [Fri, 2 Aug 2019 06:55:37 +0000 (08:55 +0200)]
src/backup/crypt_config.rs: new compute_auth_tag helper
Dietmar Maurer [Fri, 2 Aug 2019 06:29:40 +0000 (08:29 +0200)]
src/backup/crypt_config.rs: fix typo
Christian Ebner [Thu, 1 Aug 2019 15:51:59 +0000 (17:51 +0200)]
pxar: implement feature flag support for device nodes, fifos and sockets
Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
Christian Ebner [Thu, 1 Aug 2019 15:51:58 +0000 (17:51 +0200)]
pxar: remove some unused feature flags from format definition
Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
Christian Ebner [Thu, 1 Aug 2019 14:23:49 +0000 (16:23 +0200)]
src/pxar/sequential_decoder.rs: remove of obsolete function dir_mkdirat
Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
Christian Ebner [Thu, 1 Aug 2019 14:23:48 +0000 (16:23 +0200)]
src/pxar/sequentail_decoder.rs: fix issue when restoring with glob pattern.
Partial extraction of an archive with a glob pattern, e.g. '**/*.conf' lead to
the unexpected behaviour of restoring all partially matched directories (in this
example all of them).
This patch fixes this unexpected behaviour by only restoring those directories
were the directory or one of its sub-items fully matched the pattern and should
therefore be restored.
To achive this behavoiur, directory metadata is pushed onto a stack and restored
on demand.
Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
Christian Ebner [Thu, 1 Aug 2019 14:23:47 +0000 (16:23 +0200)]
src/pxar/exclude_pattern.rs: add Clone and Copy trait to MatchType
Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
Christian Ebner [Thu, 1 Aug 2019 14:23:46 +0000 (16:23 +0200)]
pxar: add PxarDir and PxarDirBuf to buffer directory metadata
In order to restore only directories when some of their content fully matched
a match pattern on partial restores, these directories and their metadata are
pushed onto this buffer and only restored successivley on demand.
Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
Dietmar Maurer [Fri, 2 Aug 2019 05:16:10 +0000 (07:16 +0200)]
src/pxar/format_definition.rs - PxarAttributes: derive Default
And remove unnecessary impl new().
Christian Ebner [Thu, 1 Aug 2019 11:08:08 +0000 (13:08 +0200)]
src/pxar/sequential_decoder.rs: split read and restore of attributes into separate functions
Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
Christian Ebner [Thu, 1 Aug 2019 11:08:07 +0000 (13:08 +0200)]
src/pxar/format_definition.rs: add struct PxarAttributes
This structure contains all the attributes allowing to easily store those within
a e.g. dir buffer.
Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
Christian Ebner [Thu, 1 Aug 2019 10:13:07 +0000 (12:13 +0200)]
pxar: avoid taking ownership of xattrs, fcaps and quota_projid on corresponding restore functions.
By borrowing these objects we preserve the functionality but make sure
that ownership doesn't change, avoiding problems when contained within other
structs such as e.g. a buffer storing these attributes.
Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
Dietmar Maurer [Thu, 1 Aug 2019 10:39:02 +0000 (12:39 +0200)]
src/bin/proxmox-backup-client.rs: upload backup index.json
The plan is to use this file to verify the backup content.
Dietmar Maurer [Wed, 31 Jul 2019 10:44:27 +0000 (12:44 +0200)]
src/tools.rs - file_set_contents_full: only call fchmod when we pass permissions
So that we can use it to write into /etc/pve/ (which does not support chmod).
Dietmar Maurer [Wed, 31 Jul 2019 09:45:55 +0000 (11:45 +0200)]
src/bin/proxmox-backup-client.rs - files: allow --repository parameter
Dietmar Maurer [Wed, 31 Jul 2019 09:23:53 +0000 (11:23 +0200)]
src/bin/proxmox-backup-client.rs: implement files command
Dietmar Maurer [Wed, 31 Jul 2019 08:15:16 +0000 (10:15 +0200)]
src/bin/proxmox-backup-client.rs: supress useless output from prune command
Christian Ebner [Mon, 29 Jul 2019 15:21:35 +0000 (17:21 +0200)]
pxar: add support for storing/restoring the quota project id on ZFS
Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
Christian Ebner [Mon, 29 Jul 2019 12:01:45 +0000 (14:01 +0200)]
pxar: implement allow_existing_dirs for pxar decoder
By default, restoring an archive will fail if files with the same filename
already exist in the target directory.
By setting the allow_existing_dirs flag, the restore will not fail if an
existing directory is encountered.
The metadata (permissions, acls, ...) of the existing directory will be set
to the ones from the archive.
Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
Dietmar Maurer [Mon, 29 Jul 2019 10:49:15 +0000 (12:49 +0200)]
src/bin/proxmox-backup-client.rs: add restore flag --allow-existing-dirs
Not jet implemented ...
Dietmar Maurer [Sat, 27 Jul 2019 07:24:23 +0000 (09:24 +0200)]
src/bin/proxmox-backup-client.rs: fixup - correctly pass prune parameters
Dietmar Maurer [Sat, 27 Jul 2019 06:49:14 +0000 (08:49 +0200)]
src/api2/admin/datastore.rs: pass backup type/id (group) to prune
IMHO, prune over all backup groups is a bit dangerous, considering
that more than one user might use a datastore.
Dietmar Maurer [Fri, 26 Jul 2019 09:11:55 +0000 (11:11 +0200)]
src/bin/proxmox-backup-client.rs: correctly compute duration
And format time with SecondsFormat::Secs
Dietmar Maurer [Fri, 26 Jul 2019 07:07:29 +0000 (09:07 +0200)]
src/api2/backup.rs: cleanup schema definitions
Dietmar Maurer [Thu, 25 Jul 2019 11:44:01 +0000 (13:44 +0200)]
src/api2/backup.rs: new required backup-time parameter
The client should pass the time as parameter.
Dietmar Maurer [Thu, 25 Jul 2019 10:23:33 +0000 (12:23 +0200)]
src/api2/admin/datastore.rs: backup logs may not be written twice
Dietmar Maurer [Thu, 25 Jul 2019 10:22:50 +0000 (12:22 +0200)]
src/api2/admin/datastore.rs: use correct .blob extension for log
Dietmar Maurer [Thu, 25 Jul 2019 10:18:15 +0000 (12:18 +0200)]
src/bin/proxmox-backup-client.rs: implement upload-log
Dietmar Maurer [Thu, 25 Jul 2019 10:17:35 +0000 (12:17 +0200)]
src/client/http_client.rs: allow upload with parameters
Dietmar Maurer [Thu, 25 Jul 2019 08:12:45 +0000 (10:12 +0200)]
src/api2/admin/datastore.rs: add api to upload backup client log file
Dietmar Maurer [Wed, 24 Jul 2019 11:07:02 +0000 (13:07 +0200)]
src/bin/proxmox-backup-client.rs: allow to uploag .log files (as binary blobs)
Dietmar Maurer [Wed, 24 Jul 2019 10:21:25 +0000 (12:21 +0200)]
src/pxar/encoder.rs: add new skip_lost_and_found parameter
Dietmar Maurer [Wed, 24 Jul 2019 09:30:43 +0000 (11:30 +0200)]
pxar_backup_stream.rs: limit lock scope to avoid blocking forever
Dietmar Maurer [Wed, 24 Jul 2019 07:33:52 +0000 (09:33 +0200)]
remove debug output
Dietmar Maurer [Wed, 24 Jul 2019 07:24:35 +0000 (09:24 +0200)]
src/client/pxar_backup_stream.rs: correctly pass errors to stream
Dietmar Maurer [Wed, 24 Jul 2019 05:48:59 +0000 (07:48 +0200)]
src/pxar/encoder.rs: allow to pass list of devices
For better mount point include control...
Dietmar Maurer [Mon, 22 Jul 2019 08:12:51 +0000 (10:12 +0200)]
Revert previous, commit, use UTC RFC3339 without timezone (Z)
We now have human readable data/time, and names are still sortable.
Dietmar Maurer [Mon, 22 Jul 2019 05:57:03 +0000 (07:57 +0200)]
src/backup/backup_info.rs: use unix epoch timestamps instead of RFC3339
RFC3339 contains additional timezone information, but IMHO this just adds
more confusion. The API also uses timestamps.
Christian Ebner [Fri, 19 Jul 2019 08:55:28 +0000 (10:55 +0200)]
src/pxar/sequential_decoder.rs: Call callback only on restored paths.
Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
Dietmar Maurer [Fri, 19 Jul 2019 05:01:57 +0000 (07:01 +0200)]
src/bin/pxar.rs - extract: print archive name with --verbose flag
Dietmar Maurer [Fri, 19 Jul 2019 05:00:17 +0000 (07:00 +0200)]
src/bin/pxar.rs: remove wrong debug message
Christian Ebner [Thu, 18 Jul 2019 09:35:51 +0000 (11:35 +0200)]
src/bin/pxar.rs: allow to pass paths and match patterns as args to pxar extract
To improve usability it is now possible to directly pass paths or match patterns
as arguments to pxar extract to partially restore an archive.
The patterns provided via CLI are appended to the ones read from file by the
--files-from option in order to have priority over those.
Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
Dietmar Maurer [Thu, 18 Jul 2019 11:16:32 +0000 (13:16 +0200)]
src/bin/proxmox-backup-client.rs: code cleanup
Dietmar Maurer [Thu, 18 Jul 2019 07:52:11 +0000 (09:52 +0200)]
src/bin/proxmox-backup-client.rs - status: only print result[data]
Dietmar Maurer [Thu, 18 Jul 2019 07:11:43 +0000 (09:11 +0200)]
src/api2/admin/datastore.rs: allow to list all snapshots
Dietmar Maurer [Wed, 17 Jul 2019 11:40:10 +0000 (13:40 +0200)]
src/cli/command.rs: set exit status on error
Christian Ebner [Tue, 16 Jul 2019 16:19:45 +0000 (18:19 +0200)]
src/bin/pxar.rs: add --files-from parameter to pxar extract
Allows to pass a list of match pattern to the pxar extract call by reading them
from file.
Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
Christian Ebner [Tue, 16 Jul 2019 16:19:44 +0000 (18:19 +0200)]
pxar: Adapt SequentialDecoder::restore() calls to pass empty match pattern for full restore
Signed-off-by: Christian Ebner <c.ebner@proxmox.com>