]> git.proxmox.com Git - proxmox-backup.git/log
proxmox-backup.git
5 years agosrc/api2/admin/datastore.rs: start prune api
Dietmar Maurer [Wed, 27 Feb 2019 15:53:17 +0000 (16:53 +0100)]
src/api2/admin/datastore.rs: start prune api

just a dummy for now.

5 years agodebian/control: use python3
Wolfgang Bumiller [Wed, 27 Feb 2019 11:43:26 +0000 (11:43 +0000)]
debian/control: use python3

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
5 years agobuildsys: deb: always build locally first
Wolfgang Bumiller [Wed, 27 Feb 2019 11:43:15 +0000 (11:43 +0000)]
buildsys: deb: always build locally first

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
5 years agorc/server/rest.rs: allow to pass parameters as application/json
Dietmar Maurer [Wed, 27 Feb 2019 11:12:00 +0000 (12:12 +0100)]
rc/server/rest.rs: allow to pass parameters as application/json

5 years agosrc/bin/proxmox-backup-client.rs: fix bash completion
Dietmar Maurer [Wed, 27 Feb 2019 07:38:32 +0000 (08:38 +0100)]
src/bin/proxmox-backup-client.rs: fix bash completion

5 years agodebian/control: rst2man is in python-docutils
Wolfgang Bumiller [Wed, 27 Feb 2019 11:26:26 +0000 (11:26 +0000)]
debian/control: rst2man is in python-docutils

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
5 years agodebian/control: sort dependencies
Wolfgang Bumiller [Wed, 27 Feb 2019 11:24:53 +0000 (11:24 +0000)]
debian/control: sort dependencies

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
5 years agobuildsys: copy Cargo.lock to build/
Wolfgang Bumiller [Wed, 27 Feb 2019 11:25:37 +0000 (11:25 +0000)]
buildsys: copy Cargo.lock to build/

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
5 years agobackup/datastore: create_backup_dir: show if path existed
Wolfgang Bumiller [Wed, 27 Feb 2019 09:02:22 +0000 (10:02 +0100)]
backup/datastore: create_backup_dir: show if path existed

To enable asserting the creation of a new backup rather than
adding to an existing one.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
5 years agosrc/bin/proxmox-backup-client.rs: minor code cleanup
Dietmar Maurer [Wed, 27 Feb 2019 06:21:57 +0000 (07:21 +0100)]
src/bin/proxmox-backup-client.rs: minor code cleanup

5 years agosrc/cli/command.rs: improve generate_usage_str
Dietmar Maurer [Tue, 26 Feb 2019 11:40:51 +0000 (12:40 +0100)]
src/cli/command.rs: improve generate_usage_str

correctly format positional array arguments ({<name>}).

5 years agosrc/bin/proxmox-backup-client.rs: allow to upload more that one directory
Dietmar Maurer [Tue, 26 Feb 2019 11:27:28 +0000 (12:27 +0100)]
src/bin/proxmox-backup-client.rs: allow to upload more that one directory

5 years agosrc/client/http_client.rs: login once, store and reuse ticket/token
Dietmar Maurer [Tue, 26 Feb 2019 10:59:10 +0000 (11:59 +0100)]
src/client/http_client.rs: login once, store and reuse ticket/token

5 years agosrc/cli/getopts.rs: cleanup, avoid compiler warning
Dietmar Maurer [Tue, 26 Feb 2019 10:55:06 +0000 (11:55 +0100)]
src/cli/getopts.rs: cleanup, avoid compiler warning

5 years agosrc/tools.rs: new helper required_array_param()
Dietmar Maurer [Tue, 26 Feb 2019 07:48:17 +0000 (08:48 +0100)]
src/tools.rs: new helper required_array_param()

5 years agosrc/cli/getopts.rs: support positional array arguments
Dietmar Maurer [Tue, 26 Feb 2019 07:47:34 +0000 (08:47 +0100)]
src/cli/getopts.rs: support positional array arguments

5 years agosrc/cli/command.rs: improve error message
Dietmar Maurer [Tue, 26 Feb 2019 07:46:36 +0000 (08:46 +0100)]
src/cli/command.rs: improve error message

5 years agosrc/api_schema/schema.rs: improve ParameterError display function
Dietmar Maurer [Tue, 26 Feb 2019 06:11:24 +0000 (07:11 +0100)]
src/api_schema/schema.rs: improve ParameterError display function

5 years agobackup/dynamic_index: split out add_chunk
Wolfgang Bumiller [Mon, 25 Feb 2019 12:50:45 +0000 (13:50 +0100)]
backup/dynamic_index: split out add_chunk

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
5 years agobackup/chunk_store: split insert_chunk
Wolfgang Bumiller [Fri, 22 Feb 2019 09:35:40 +0000 (10:35 +0100)]
backup/chunk_store: split insert_chunk

The protocol handler will receive chunk data plus a hash
pre-calculated by the client. It will verify the hash before
sending it up to the datastore in order to respond to the
client with an error on a mismatch, so there's no need to
recalculate the hash another time.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
5 years agobackup/chunk_store: mark ChunkIterator as fused
Wolfgang Bumiller [Fri, 15 Feb 2019 09:12:35 +0000 (10:12 +0100)]
backup/chunk_store: mark ChunkIterator as fused

Ranges are FusedIterators and it can be useful to propagate
that property to users.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
5 years agobackup/chunk_store: make percentage output optional
Wolfgang Bumiller [Fri, 15 Feb 2019 08:12:44 +0000 (09:12 +0100)]
backup/chunk_store: make percentage output optional

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
5 years agobackup/datastore: expose chunk_store.get_chunk_iterator
Wolfgang Bumiller [Thu, 14 Feb 2019 10:39:09 +0000 (11:39 +0100)]
backup/datastore: expose chunk_store.get_chunk_iterator

will be used by the protocol handler to iterate over
existing chunks

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
5 years agosrc/backup/chunk_stat.rs: log write speed
Dietmar Maurer [Mon, 25 Feb 2019 12:21:00 +0000 (13:21 +0100)]
src/backup/chunk_stat.rs: log write speed

5 years agosrc/backup/chunk_stat.rs: new struct to track chunk statistics
Dietmar Maurer [Mon, 25 Feb 2019 11:52:10 +0000 (12:52 +0100)]
src/backup/chunk_stat.rs: new struct to track chunk statistics

5 years agosrc/backup/chunk_store.rs: return info about compressed chunk size
Dietmar Maurer [Mon, 25 Feb 2019 10:36:05 +0000 (11:36 +0100)]
src/backup/chunk_store.rs: return info about compressed chunk size

So that we can generate better statistics ..

5 years agosrc/backup/chunk_store.rs: use lz4 for compression
Dietmar Maurer [Mon, 25 Feb 2019 06:26:40 +0000 (07:26 +0100)]
src/backup/chunk_store.rs: use lz4 for compression

And depend on lz4 lib now.

5 years agodocs/Makefile: fix make dependency
Dietmar Maurer [Sun, 24 Feb 2019 15:19:39 +0000 (16:19 +0100)]
docs/Makefile: fix make dependency

5 years agodocs/proxmox-backup.rst: start writing docs
Dietmar Maurer [Sun, 24 Feb 2019 14:52:04 +0000 (15:52 +0100)]
docs/proxmox-backup.rst: start writing docs

5 years agostart generating manual pages
Dietmar Maurer [Sun, 24 Feb 2019 08:51:10 +0000 (09:51 +0100)]
start generating manual pages

Depend on docutils-doc

5 years agosrc/cli/command.rs: improve help command completion
Dietmar Maurer [Sat, 23 Feb 2019 17:07:32 +0000 (18:07 +0100)]
src/cli/command.rs: improve help command completion

5 years agosrc/cli/command.rs: cleanup, avoid array manipulation
Dietmar Maurer [Sat, 23 Feb 2019 16:50:33 +0000 (17:50 +0100)]
src/cli/command.rs: cleanup, avoid array manipulation

5 years agosrc/cli/command.rs: implement bash completion for help
Dietmar Maurer [Sat, 23 Feb 2019 16:38:10 +0000 (17:38 +0100)]
src/cli/command.rs: implement bash completion for help

5 years agosrc/cli/command.rs: add help command
Dietmar Maurer [Sat, 23 Feb 2019 14:10:48 +0000 (15:10 +0100)]
src/cli/command.rs: add help command

5 years agosrc/cli/command.rs::allow to generate ReST docu
Dietmar Maurer [Sat, 23 Feb 2019 10:29:18 +0000 (11:29 +0100)]
src/cli/command.rs::allow to generate ReST docu

5 years agosrc/cli/command.rs: improve usage imformation
Dietmar Maurer [Fri, 22 Feb 2019 16:40:37 +0000 (17:40 +0100)]
src/cli/command.rs: improve usage imformation

5 years agosrc/backup/chunker.rs: simplify break test
Dietmar Maurer [Fri, 22 Feb 2019 12:02:11 +0000 (13:02 +0100)]
src/backup/chunker.rs: simplify break test

To make it a little bit faster ...

5 years agosrc/cli/command.rs: start implementing generate_usage_str()
Dietmar Maurer [Fri, 22 Feb 2019 10:14:01 +0000 (11:14 +0100)]
src/cli/command.rs: start implementing generate_usage_str()

5 years agosrc/cli/command.rs: simplify cli handler
Dietmar Maurer [Thu, 21 Feb 2019 10:08:59 +0000 (11:08 +0100)]
src/cli/command.rs: simplify cli handler

5 years agosrc/backup/chunker.rs: another try to speedup the chunker
Dietmar Maurer [Thu, 21 Feb 2019 17:56:41 +0000 (18:56 +0100)]
src/backup/chunker.rs: another try to speedup the chunker

5 years agosrc/cli/getopts.rs: improve docs
Dietmar Maurer [Thu, 21 Feb 2019 08:36:52 +0000 (09:36 +0100)]
src/cli/getopts.rs: improve docs

5 years agocleanup cli library structure
Dietmar Maurer [Thu, 21 Feb 2019 08:07:25 +0000 (09:07 +0100)]
cleanup cli library structure

5 years agohttp_client: on a tty, read password if no env var is set
Wolfgang Bumiller [Wed, 20 Feb 2019 13:18:27 +0000 (14:18 +0100)]
http_client: on a tty, read password if no env var is set

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
5 years agotools: add tty helper module
Wolfgang Bumiller [Wed, 20 Feb 2019 11:08:58 +0000 (12:08 +0100)]
tools: add tty helper module

with read_password() and stdin_isatty() functions

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
5 years agosrc/bin/proxmox-backup-client.rs: implement garbage-collection sub-command
Dietmar Maurer [Wed, 20 Feb 2019 13:10:45 +0000 (14:10 +0100)]
src/bin/proxmox-backup-client.rs: implement garbage-collection sub-command

5 years agosrc/client/http_client.rs: implement post
Dietmar Maurer [Wed, 20 Feb 2019 13:09:55 +0000 (14:09 +0100)]
src/client/http_client.rs: implement post

without parameters for now...

5 years agosrc/backup/datastore.rs: list_backups() - include list of index files
Dietmar Maurer [Wed, 20 Feb 2019 12:37:44 +0000 (13:37 +0100)]
src/backup/datastore.rs: list_backups() - include list of index files

5 years agosrc/bin/test_chunk_size.rs: avoid compilöer warnings, exit after 1GB
Dietmar Maurer [Wed, 20 Feb 2019 11:05:28 +0000 (12:05 +0100)]
src/bin/test_chunk_size.rs: avoid compilöer warnings, exit after 1GB

5 years agosrc/bin/test_chunk_size.rs: another chunker test - gather some stats
Dietmar Maurer [Wed, 20 Feb 2019 10:50:10 +0000 (11:50 +0100)]
src/bin/test_chunk_size.rs: another chunker test - gather some stats

5 years agosrc/backup/chunker.rs: simplify code
Dietmar Maurer [Wed, 20 Feb 2019 10:17:19 +0000 (11:17 +0100)]
src/backup/chunker.rs: simplify code

5 years agosrc/backup/chunker.rs: change window size back to 48
Dietmar Maurer [Wed, 20 Feb 2019 10:01:09 +0000 (11:01 +0100)]
src/backup/chunker.rs: change window size back to 48

Using 64 is a bad idea, because it always computes hash 0 for
constant data streams.

5 years agosrc/api2/admin/datastore/catar.rs: allow to configure chunk-size
Dietmar Maurer [Tue, 19 Feb 2019 14:19:12 +0000 (15:19 +0100)]
src/api2/admin/datastore/catar.rs: allow to configure chunk-size

5 years agosrc/backup/chunker.rs: start() - correctly store hash in self.h
Dietmar Maurer [Tue, 19 Feb 2019 11:40:12 +0000 (12:40 +0100)]
src/backup/chunker.rs: start() - correctly store hash in self.h

5 years agosrc/backup/chunker.rs: use 64 byte chunker window size
Dietmar Maurer [Tue, 19 Feb 2019 11:27:37 +0000 (12:27 +0100)]
src/backup/chunker.rs: use 64 byte chunker window size

This results in faster code.

5 years agosrc/backup/chunker.rs: simplify buzzhash start code
Dietmar Maurer [Tue, 19 Feb 2019 11:17:17 +0000 (12:17 +0100)]
src/backup/chunker.rs: simplify buzzhash start code

5 years agoUploadCaTar: currectly write all data using write_all()
Dietmar Maurer [Mon, 18 Feb 2019 17:31:02 +0000 (18:31 +0100)]
UploadCaTar: currectly write all data using write_all()

5 years agosrc/backup/chunker.rs: correctly compute window index 'idx'
Dietmar Maurer [Mon, 18 Feb 2019 10:02:31 +0000 (11:02 +0100)]
src/backup/chunker.rs: correctly compute window index 'idx'

And add a simple test.

5 years agosrc/client/http_client.rs: send csrf token
Dietmar Maurer [Mon, 18 Feb 2019 10:01:49 +0000 (11:01 +0100)]
src/client/http_client.rs: send csrf token

5 years agocleanup
Wolfgang Bumiller [Mon, 18 Feb 2019 12:21:25 +0000 (13:21 +0100)]
cleanup

Error::from is already a function taking 1 parameter,
there's no need to wrap it with `|e| Error::from(e)`.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
5 years agofix typo: confi{g}dir
Wolfgang Bumiller [Mon, 18 Feb 2019 12:11:42 +0000 (13:11 +0100)]
fix typo: confi{g}dir

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
5 years agosrc/server/rest.rs: correctly insert NoLogExtension()
Dietmar Maurer [Mon, 18 Feb 2019 05:54:12 +0000 (06:54 +0100)]
src/server/rest.rs: correctly insert NoLogExtension()

5 years agosrc/client/http_client.rs: trim path
Dietmar Maurer [Mon, 18 Feb 2019 05:24:28 +0000 (06:24 +0100)]
src/client/http_client.rs: trim path

5 years agosrc/server/rest.rs: get_index() include username and CSRF token
Dietmar Maurer [Sun, 17 Feb 2019 17:50:40 +0000 (18:50 +0100)]
src/server/rest.rs: get_index() include username and CSRF token

When we have an valid ticket. Also delay get_index() if called with
an invalid ticket.

5 years agosrc/server/rest.rs: factor our normalize_path()
Dietmar Maurer [Sun, 17 Feb 2019 16:31:53 +0000 (17:31 +0100)]
src/server/rest.rs: factor our normalize_path()

5 years agosrc/server/rest.rs: improve logs for unauthorized request
Dietmar Maurer [Sun, 17 Feb 2019 16:18:44 +0000 (17:18 +0100)]
src/server/rest.rs: improve logs for unauthorized request

5 years agosrc/api_schema/schema.rs: improve docu
Dietmar Maurer [Sun, 17 Feb 2019 11:13:06 +0000 (12:13 +0100)]
src/api_schema/schema.rs: improve docu

5 years agosrc/api_schema/router.rs: add docu for RpcEnvironmentType
Dietmar Maurer [Sun, 17 Feb 2019 10:59:18 +0000 (11:59 +0100)]
src/api_schema/router.rs: add docu for RpcEnvironmentType

5 years agoapi_schema/router.rs: improve doc
Dietmar Maurer [Sun, 17 Feb 2019 09:30:41 +0000 (10:30 +0100)]
api_schema/router.rs: improve doc

5 years agoimprove api_schema module structure
Dietmar Maurer [Sun, 17 Feb 2019 09:16:33 +0000 (10:16 +0100)]
improve api_schema module structure

5 years agorename src/api to src/api_schema
Dietmar Maurer [Sun, 17 Feb 2019 08:59:20 +0000 (09:59 +0100)]
rename src/api to src/api_schema

5 years agocleanup auth code, verify CSRF prevention token
Dietmar Maurer [Sat, 16 Feb 2019 14:52:55 +0000 (15:52 +0100)]
cleanup auth code, verify CSRF prevention token

5 years agowww/DataStoreConfig.js - add title
Dietmar Maurer [Sat, 16 Feb 2019 12:46:20 +0000 (13:46 +0100)]
www/DataStoreConfig.js - add title

5 years agotools/common_regex.rs: add more docu
Dietmar Maurer [Sat, 16 Feb 2019 11:36:01 +0000 (12:36 +0100)]
tools/common_regex.rs: add more docu

5 years agobuildcfg.rs: improve doc
Dietmar Maurer [Sat, 16 Feb 2019 11:28:50 +0000 (12:28 +0100)]
buildcfg.rs: improve doc

5 years agofix configuration dir permission
Dietmar Maurer [Sat, 16 Feb 2019 11:19:13 +0000 (12:19 +0100)]
fix configuration dir permission

Carefully set and check permissions ...

5 years agoconfig/datastore.rs: remove unused code
Dietmar Maurer [Sat, 16 Feb 2019 09:10:45 +0000 (10:10 +0100)]
config/datastore.rs: remove unused code

5 years agoconfig/datastore.rs: return empty config if file does not exist
Dietmar Maurer [Sat, 16 Feb 2019 09:06:08 +0000 (10:06 +0100)]
config/datastore.rs: return empty config if file does not exist

5 years agotools::file_get_contents - improve error message
Dietmar Maurer [Sat, 16 Feb 2019 08:42:00 +0000 (09:42 +0100)]
tools::file_get_contents - improve error message

5 years agotools::file_read_firstline - improve error message
Dietmar Maurer [Sat, 16 Feb 2019 08:36:29 +0000 (09:36 +0100)]
tools::file_read_firstline - improve error message

5 years agochange proxy user from www-data to backup
Dietmar Maurer [Sat, 16 Feb 2019 08:29:04 +0000 (09:29 +0100)]
change proxy user from www-data to backup

5 years agotools.rs: new helper to get uid/gid for the sepcified system user.
Dietmar Maurer [Fri, 15 Feb 2019 14:33:12 +0000 (15:33 +0100)]
tools.rs: new helper to get uid/gid for the sepcified system user.

Or is there an easier way to get that info?

5 years agobackup/datastore.rs: improve error reporting
Dietmar Maurer [Fri, 15 Feb 2019 13:33:03 +0000 (14:33 +0100)]
backup/datastore.rs: improve error reporting

5 years agosection_config.rs: simplify parser by using new try_block macro
Dietmar Maurer [Fri, 15 Feb 2019 11:13:15 +0000 (12:13 +0100)]
section_config.rs: simplify parser by using new try_block macro

5 years agotools.rs: fix doc tests
Dietmar Maurer [Fri, 15 Feb 2019 10:33:51 +0000 (11:33 +0100)]
tools.rs: fix doc tests

5 years agotools.rs: document try_block macro
Dietmar Maurer [Fri, 15 Feb 2019 10:20:45 +0000 (11:20 +0100)]
tools.rs: document try_block macro

5 years agotools.rs: new try_block macro
Dietmar Maurer [Fri, 15 Feb 2019 09:59:12 +0000 (10:59 +0100)]
tools.rs: new try_block macro

5 years agoupdate to pam 0.7 (renamed from pam-auth)
Wolfgang Bumiller [Fri, 15 Feb 2019 09:32:14 +0000 (10:32 +0100)]
update to pam 0.7 (renamed from pam-auth)

It now supports custom conversation methods, so instead of
new() we ask for a default authenticator taking a password
via with_password(). Since the password is now handled by
the now separate conversation handler, `set_credentials()`
is now called on the handler we get via `.get_handler()`.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
5 years agoserver/rest.rs: add method to log message
Dietmar Maurer [Fri, 15 Feb 2019 09:16:12 +0000 (10:16 +0100)]
server/rest.rs: add method to log message

5 years agoapi2/admin/datastore/catar.rs: simplify/fix debug message
Dietmar Maurer [Fri, 15 Feb 2019 09:04:37 +0000 (10:04 +0100)]
api2/admin/datastore/catar.rs: simplify/fix debug message

5 years agoserver/rest.rs: log full error messages
Dietmar Maurer [Fri, 15 Feb 2019 08:55:12 +0000 (09:55 +0100)]
server/rest.rs: log full error messages

5 years agoserver/rest.rs: use a protocol extension to avoid double log
Dietmar Maurer [Thu, 14 Feb 2019 15:04:24 +0000 (16:04 +0100)]
server/rest.rs: use a protocol extension to avoid double log

Instead of modifying the response header itself.

5 years agoavoid double logging of proxied requests
Dietmar Maurer [Thu, 14 Feb 2019 12:28:41 +0000 (13:28 +0100)]
avoid double logging of proxied requests

5 years agoRevert "backup/datastore: fn open is a private implementation detail"
Dietmar Maurer [Thu, 14 Feb 2019 12:13:49 +0000 (13:13 +0100)]
Revert "backup/datastore: fn open is a private implementation detail"

This reverts commit 3dacd9a660696c5b9571d50e4603ed222ecdc634.

I currently use this in some test ...

5 years agosrc/server/rest.rs: log failed requests
Dietmar Maurer [Thu, 14 Feb 2019 12:07:34 +0000 (13:07 +0100)]
src/server/rest.rs: log failed requests

5 years agotools/fs: mark ReadDir as Send
Wolfgang Bumiller [Thu, 14 Feb 2019 11:33:20 +0000 (12:33 +0100)]
tools/fs: mark ReadDir as Send

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
5 years agobackup/chunk_store: verify chunk file names
Wolfgang Bumiller [Thu, 14 Feb 2019 10:38:11 +0000 (11:38 +0100)]
backup/chunk_store: verify chunk file names

get_chunk_iterator() should skip over files which aren't an
actual chunk

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
5 years agobackup/datastore: fn open is a private implementation detail
Wolfgang Bumiller [Thu, 14 Feb 2019 10:17:06 +0000 (11:17 +0100)]
backup/datastore: fn open is a private implementation detail

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
5 years agobackup/chunk_store: open base dir in get_chunk_iterator
Wolfgang Bumiller [Thu, 14 Feb 2019 10:16:34 +0000 (11:16 +0100)]
backup/chunk_store: open base dir in get_chunk_iterator

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
5 years agosrc/client/backup_repo.rs - improve docu
Dietmar Maurer [Thu, 14 Feb 2019 10:17:08 +0000 (11:17 +0100)]
src/client/backup_repo.rs -  improve docu

5 years agosrc/client.rs: improve library structure and docu
Dietmar Maurer [Thu, 14 Feb 2019 10:11:39 +0000 (11:11 +0100)]
src/client.rs: improve library structure and docu