]> git.proxmox.com Git - proxmox-backup.git/log
proxmox-backup.git
5 years agoserver/rest.rs: simplify proxy code
Dietmar Maurer [Mon, 28 Jan 2019 17:22:16 +0000 (18:22 +0100)]
server/rest.rs: simplify proxy code

Only pass neccessary parameters.

5 years agoadd protected flag for some api methods
Dietmar Maurer [Mon, 28 Jan 2019 17:16:47 +0000 (18:16 +0100)]
add protected flag for some api methods

5 years agoserver/rest.rs: implement proxy_sync_api_request
Dietmar Maurer [Mon, 28 Jan 2019 17:06:42 +0000 (18:06 +0100)]
server/rest.rs: implement proxy_sync_api_request

5 years agoserver/rest.rs: add proxy_sync_api_request() dummy
Dietmar Maurer [Mon, 28 Jan 2019 16:30:39 +0000 (17:30 +0100)]
server/rest.rs: add proxy_sync_api_request() dummy

5 years agoapi/router.rs: add new 'protected' flag to ApiMethod
Dietmar Maurer [Mon, 28 Jan 2019 16:18:42 +0000 (17:18 +0100)]
api/router.rs: add new 'protected' flag to ApiMethod

5 years agoserver/formatter.rs: fix extjs error format
Dietmar Maurer [Mon, 28 Jan 2019 12:44:48 +0000 (13:44 +0100)]
server/formatter.rs: fix extjs error format

5 years agosrc/bin/proxmox-backup-proxy.rs: implement unpriviledged server
Dietmar Maurer [Mon, 28 Jan 2019 12:17:03 +0000 (13:17 +0100)]
src/bin/proxmox-backup-proxy.rs: implement unpriviledged server

We want to run the public server as user www-data. Requests needing
root priviledges needs to be proxied to the proxmox-backup.service, which
now listens to 127.0.0.1:82.

5 years agoapi2/node/services.rs: implement service commands
Dietmar Maurer [Sun, 27 Jan 2019 11:40:31 +0000 (12:40 +0100)]
api2/node/services.rs: implement service commands

5 years agoRpcEnvironment: implement set_user() and get_user()
Dietmar Maurer [Sun, 27 Jan 2019 09:42:45 +0000 (10:42 +0100)]
RpcEnvironment: implement set_user() and get_user()

5 years agoRpcEnvironment: add environment type enum RpcEnvironmentType
Dietmar Maurer [Sun, 27 Jan 2019 09:33:42 +0000 (10:33 +0100)]
RpcEnvironment: add environment type enum RpcEnvironmentType

5 years agoalso pass rpcenv to async handlers
Dietmar Maurer [Sun, 27 Jan 2019 09:18:52 +0000 (10:18 +0100)]
also pass rpcenv to async handlers

5 years agoapi2/node/services.rs: start services api
Dietmar Maurer [Sat, 26 Jan 2019 16:54:18 +0000 (17:54 +0100)]
api2/node/services.rs: start services api

5 years agomove rpc environment implementation to separate files
Dietmar Maurer [Sat, 26 Jan 2019 14:08:02 +0000 (15:08 +0100)]
move rpc environment implementation to separate files

5 years agoapi: pass RpcEnvirnment to api handlers
Dietmar Maurer [Sat, 26 Jan 2019 13:50:37 +0000 (14:50 +0100)]
api: pass RpcEnvirnment to api handlers

5 years agouse crate log and syslog
Dietmar Maurer [Sat, 26 Jan 2019 09:56:11 +0000 (10:56 +0100)]
use crate log and syslog

5 years agoapi2/node/syslog.rs: improve error handling
Dietmar Maurer [Sat, 26 Jan 2019 09:23:52 +0000 (10:23 +0100)]
api2/node/syslog.rs: improve error handling

5 years agoapi2/node/syslog.rs: implement dump journal
Dietmar Maurer [Fri, 25 Jan 2019 17:20:51 +0000 (18:20 +0100)]
api2/node/syslog.rs: implement dump journal

5 years agoapi2/node/syslog.rs: add syslog api schema
Dietmar Maurer [Fri, 25 Jan 2019 16:17:30 +0000 (17:17 +0100)]
api2/node/syslog.rs: add syslog api schema

5 years agoServerAdministration.js: use localhost inside api path
Dietmar Maurer [Fri, 25 Jan 2019 12:14:43 +0000 (13:14 +0100)]
ServerAdministration.js: use localhost inside api path

5 years agoServerAdministration.js: new widget
Dietmar Maurer [Fri, 25 Jan 2019 12:10:55 +0000 (13:10 +0100)]
ServerAdministration.js: new widget

5 years agoDataStoreConfig.js: new widget
Dietmar Maurer [Fri, 25 Jan 2019 12:04:10 +0000 (13:04 +0100)]
DataStoreConfig.js: new widget

5 years agowww/OnlineHelpInfo.js: add dummy to avoid warnings
Dietmar Maurer [Fri, 25 Jan 2019 11:37:01 +0000 (12:37 +0100)]
www/OnlineHelpInfo.js: add dummy to avoid warnings

5 years agotools::get_hardware_address - fix FILENAME, use file_get_contents()
Dietmar Maurer [Fri, 25 Jan 2019 11:23:47 +0000 (12:23 +0100)]
tools::get_hardware_address -  fix FILENAME, use file_get_contents()

5 years agoapi2/node/dns.rs: implement concurrent update protection
Dietmar Maurer [Fri, 25 Jan 2019 10:38:59 +0000 (11:38 +0100)]
api2/node/dns.rs: implement concurrent update protection

5 years agopi2/node/dns.rs: return file digest
Dietmar Maurer [Fri, 25 Jan 2019 10:03:41 +0000 (11:03 +0100)]
pi2/node/dns.rs: return file digest

5 years agotools.rs: move digest_to_hex() into tools
Dietmar Maurer [Fri, 25 Jan 2019 09:58:28 +0000 (10:58 +0100)]
tools.rs: move digest_to_hex() into tools

5 years agotools.rs: implement file_get_contents()
Dietmar Maurer [Fri, 25 Jan 2019 09:44:40 +0000 (10:44 +0100)]
tools.rs: implement file_get_contents()

5 years agoapi2/node/dns.rs: improve dns api
Dietmar Maurer [Fri, 25 Jan 2019 09:15:32 +0000 (10:15 +0100)]
api2/node/dns.rs: improve dns api

5 years agobackup/chunk_store.rs: fix test case - use absolute path
Dietmar Maurer [Fri, 25 Jan 2019 09:14:25 +0000 (10:14 +0100)]
backup/chunk_store.rs: fix test case - use absolute path

5 years agoapi2/node/dns.rs: implement resolv.conf parser
Dietmar Maurer [Thu, 24 Jan 2019 13:59:40 +0000 (14:59 +0100)]
api2/node/dns.rs: implement resolv.conf parser

5 years agobackup/datastore.rs: use single lazy_static block
Dietmar Maurer [Thu, 24 Jan 2019 13:58:47 +0000 (14:58 +0100)]
backup/datastore.rs: use single lazy_static block

5 years agoapi2/node/time.rs: implement set timezone
Dietmar Maurer [Thu, 24 Jan 2019 11:05:06 +0000 (12:05 +0100)]
api2/node/time.rs: implement set timezone

5 years agoapi2/node/time.rs: add return schema
Dietmar Maurer [Thu, 24 Jan 2019 10:07:11 +0000 (11:07 +0100)]
api2/node/time.rs: add return schema

5 years agotools.rs: implement file_read_firstline
Dietmar Maurer [Thu, 24 Jan 2019 09:43:30 +0000 (10:43 +0100)]
tools.rs: implement file_read_firstline

5 years agoapi2/node/time.rs: implement read api
Dietmar Maurer [Wed, 23 Jan 2019 14:14:14 +0000 (15:14 +0100)]
api2/node/time.rs: implement read api

5 years agosrc/api2/node: start node configuration api
Dietmar Maurer [Wed, 23 Jan 2019 12:05:32 +0000 (13:05 +0100)]
src/api2/node: start node configuration api

5 years agoserver/rest.rs: fake login cookie
Dietmar Maurer [Wed, 23 Jan 2019 11:49:10 +0000 (12:49 +0100)]
server/rest.rs: fake login cookie

5 years agoadd missing api2.rs
Dietmar Maurer [Tue, 22 Jan 2019 12:56:27 +0000 (13:56 +0100)]
add missing api2.rs

5 years agoapi2/subscription.rs: add subscription api class
Dietmar Maurer [Tue, 22 Jan 2019 11:50:19 +0000 (12:50 +0100)]
api2/subscription.rs: add subscription api class

5 years agorename api3 back to api2
Dietmar Maurer [Tue, 22 Jan 2019 11:10:38 +0000 (12:10 +0100)]
rename api3 back to api2

There is no real need to change the path, so using api2 we can reuse
all helpers (like tools from proxmox widget toolkit).

5 years agogui: add navigation tree
Dietmar Maurer [Tue, 22 Jan 2019 10:48:00 +0000 (11:48 +0100)]
gui: add navigation tree

5 years agolient/http_client.rs: simplify code
Dietmar Maurer [Tue, 22 Jan 2019 09:36:04 +0000 (10:36 +0100)]
lient/http_client.rs: simplify code

5 years agobin/proxmox-backup-client.rs: implement list command
Dietmar Maurer [Mon, 21 Jan 2019 17:58:14 +0000 (18:58 +0100)]
bin/proxmox-backup-client.rs: implement list command

5 years agoclient/http_client.rs: implement get, share common code
Dietmar Maurer [Mon, 21 Jan 2019 17:56:48 +0000 (18:56 +0100)]
client/http_client.rs: implement get, share common code

5 years agoapi3/admin/datastore.rs: implement list backups
Dietmar Maurer [Mon, 21 Jan 2019 10:22:55 +0000 (11:22 +0100)]
api3/admin/datastore.rs: implement list backups

5 years agobackup/datastore.rs: use DateTime<Utc> to store backup time
Dietmar Maurer [Mon, 21 Jan 2019 09:51:52 +0000 (10:51 +0100)]
backup/datastore.rs: use DateTime<Utc> to store backup time

5 years agowhite space fix
Dietmar Maurer [Mon, 21 Jan 2019 09:32:07 +0000 (10:32 +0100)]
white space fix

5 years agobackup/datastore.rs: implement list_backups
Dietmar Maurer [Sun, 20 Jan 2019 17:02:06 +0000 (18:02 +0100)]
backup/datastore.rs: implement list_backups

5 years agotools.rs: use FnMut for scandir callback
Dietmar Maurer [Sun, 20 Jan 2019 16:49:11 +0000 (17:49 +0100)]
tools.rs: use FnMut for scandir callback

5 years agotools.rs: new scandir() helper
Dietmar Maurer [Sun, 20 Jan 2019 16:31:43 +0000 (17:31 +0100)]
tools.rs: new scandir() helper

5 years agobackup/chunk_store.rs: verify base path is absolute
Dietmar Maurer [Sun, 20 Jan 2019 15:49:22 +0000 (16:49 +0100)]
backup/chunk_store.rs: verify base path is absolute

5 years agoremove crate tokio-codec (seems to be part of tokio now)
Dietmar Maurer [Sun, 20 Jan 2019 13:28:06 +0000 (14:28 +0100)]
remove crate tokio-codec (seems to be part of tokio now)

5 years agotools/wrapped_reader_stream.rs: allocate Vec<u8> for buffer
Dietmar Maurer [Sun, 20 Jan 2019 10:01:18 +0000 (11:01 +0100)]
tools/wrapped_reader_stream.rs: allocate Vec<u8> for buffer

5 years agotools/wrapped_reader_stream.rs: only implement Stream (without AsyncRead)
Dietmar Maurer [Sun, 20 Jan 2019 09:41:21 +0000 (10:41 +0100)]
tools/wrapped_reader_stream.rs: only implement Stream (without AsyncRead)

Looks more efficent ...

5 years agotools/wrapped_reader_stream.rs: use tokio_threadpool::blocking
Dietmar Maurer [Sun, 20 Jan 2019 09:28:51 +0000 (10:28 +0100)]
tools/wrapped_reader_stream.rs: use tokio_threadpool::blocking

5 years agouse newer versions
Dietmar Maurer [Sun, 20 Jan 2019 09:06:29 +0000 (10:06 +0100)]
use newer versions

5 years agocatar: improve bash completion
Dietmar Maurer [Sun, 20 Jan 2019 08:55:20 +0000 (09:55 +0100)]
catar: improve bash completion

5 years ago/api3/admin/datastore.rs: add missing subdir to directory index
Dietmar Maurer [Sun, 20 Jan 2019 08:47:32 +0000 (09:47 +0100)]
/api3/admin/datastore.rs: add missing subdir to directory index

5 years agoapi3/admin/datastore/catar.rs: implement download
Dietmar Maurer [Sun, 20 Jan 2019 08:39:32 +0000 (09:39 +0100)]
api3/admin/datastore/catar.rs: implement download

5 years agotools/wrapped_reader_stream.rs: new helper class
Dietmar Maurer [Sun, 20 Jan 2019 08:38:28 +0000 (09:38 +0100)]
tools/wrapped_reader_stream.rs: new helper class

Will use that to download catar files.

5 years agoapi3/admin/datastore/catar.rs: start impl. download
Dietmar Maurer [Sat, 19 Jan 2019 16:27:02 +0000 (17:27 +0100)]
api3/admin/datastore/catar.rs: start impl. download

5 years agoapi/router.rs: rename ApiUploadMethod to ApiAsyncMethod
Dietmar Maurer [Sat, 19 Jan 2019 15:42:43 +0000 (16:42 +0100)]
api/router.rs: rename ApiUploadMethod to ApiAsyncMethod

We can use this for uploads and downloads ...

5 years agoRevert "/api/schema.rs: implement Schema::Option"
Dietmar Maurer [Sat, 19 Jan 2019 11:53:07 +0000 (12:53 +0100)]
Revert "/api/schema.rs: implement Schema::Option"

This reverts commit 0a35462c1e3b9429ea9f276ac620af4752919dff.

I am not sure this add much value, and the old approach needs
less memory. If we really need single optional values, we can still
implement such Option while keeping the hash based approach...

5 years agoRevert "api/schema.rs: avoid Option(Option( nesting"
Dietmar Maurer [Sat, 19 Jan 2019 11:52:51 +0000 (12:52 +0100)]
Revert "api/schema.rs: avoid Option(Option( nesting"

This reverts commit ffdac1af01f16ab679b4bbd87f1126e54d338880.

5 years agoremove unused type PropertyMap
Dietmar Maurer [Fri, 18 Jan 2019 16:54:06 +0000 (17:54 +0100)]
remove unused type PropertyMap

5 years agoapi/schema.rs: avoid Option(Option( nesting
Dietmar Maurer [Fri, 18 Jan 2019 16:49:19 +0000 (17:49 +0100)]
api/schema.rs: avoid Option(Option( nesting

5 years ago/api/schema.rs: implement Schema::Option
Dietmar Maurer [Fri, 18 Jan 2019 16:40:37 +0000 (17:40 +0100)]
/api/schema.rs: implement Schema::Option

5 years agofix tests/catar.rs - add missing parameter
Dietmar Maurer [Fri, 18 Jan 2019 16:39:51 +0000 (17:39 +0100)]
fix tests/catar.rs - add missing parameter

5 years agoreduce compiler warnings
Dietmar Maurer [Fri, 18 Jan 2019 15:50:15 +0000 (16:50 +0100)]
reduce compiler warnings

5 years agomove complete_file_name() helper into tools.rs
Dietmar Maurer [Fri, 18 Jan 2019 12:42:52 +0000 (13:42 +0100)]
move complete_file_name() helper into tools.rs

5 years agobin/proxmox-backup-client.rs: improve file name completion
Dietmar Maurer [Fri, 18 Jan 2019 12:40:05 +0000 (13:40 +0100)]
bin/proxmox-backup-client.rs: improve file name completion

5 years agobackup/datastore.rs: list all index files using walkdir crate
Dietmar Maurer [Fri, 18 Jan 2019 11:24:58 +0000 (12:24 +0100)]
backup/datastore.rs: list all index files using walkdir crate

5 years agobackup/datastore.rs: try to create useful directory layout
Dietmar Maurer [Fri, 18 Jan 2019 11:01:37 +0000 (12:01 +0100)]
backup/datastore.rs: try to create useful directory layout

store/type/ID/TIME/xxx.yyy

5 years agocleanup nodename()
Dietmar Maurer [Fri, 18 Jan 2019 09:13:45 +0000 (10:13 +0100)]
cleanup nodename()

5 years agotools.rs: new helper nodename()
Dietmar Maurer [Fri, 18 Jan 2019 08:58:15 +0000 (09:58 +0100)]
tools.rs: new helper nodename()

5 years agoapi3/admin/datastore.rs: rename parameter "name" to "store"
Dietmar Maurer [Fri, 18 Jan 2019 07:33:11 +0000 (08:33 +0100)]
api3/admin/datastore.rs: rename parameter "name" to "store"

5 years agobin/proxmox-backup-client.rs: implement file name completions - first try ...
Dietmar Maurer [Thu, 17 Jan 2019 13:24:20 +0000 (14:24 +0100)]
bin/proxmox-backup-client.rs: implement file name completions - first try ...

5 years agoapi3/admin/datastore/upload_catar.rs: verify content type ("application/x-proxmox...
Dietmar Maurer [Thu, 17 Jan 2019 11:43:29 +0000 (12:43 +0100)]
api3/admin/datastore/upload_catar.rs: verify content type ("application/x-proxmox-backup-catar")

5 years agoclient/catar_backup_stream.rs: remove debug code
Dietmar Maurer [Thu, 17 Jan 2019 11:16:36 +0000 (12:16 +0100)]
client/catar_backup_stream.rs: remove debug code

5 years agotools.rs: new helper required_string_param()
Dietmar Maurer [Thu, 17 Jan 2019 11:14:02 +0000 (12:14 +0100)]
tools.rs: new helper required_string_param()

To extract parameters from Value.

5 years agoapi/router.rs: return Result in upload handler
Dietmar Maurer [Thu, 17 Jan 2019 11:03:38 +0000 (12:03 +0100)]
api/router.rs: return Result in upload handler

5 years agoproxmox-backup-client: implement upload to server
Dietmar Maurer [Thu, 17 Jan 2019 10:38:22 +0000 (11:38 +0100)]
proxmox-backup-client: implement upload to server

5 years agoclient/http_client.rs: new helper class
Dietmar Maurer [Thu, 17 Jan 2019 10:29:38 +0000 (11:29 +0100)]
client/http_client.rs: new helper class

5 years agoapi3/admin/datastore.rs: change api patch for upload_catar
Dietmar Maurer [Thu, 17 Jan 2019 08:16:50 +0000 (09:16 +0100)]
api3/admin/datastore.rs: change api patch for upload_catar

5 years agoupload: don't return NotReady
Wolfgang Bumiller [Wed, 16 Jan 2019 14:17:25 +0000 (15:17 +0100)]
upload: don't return NotReady

We need to kick (poll) the stream's next element, so simply
reiterate, the try_read!() will then return NotReady from
the next stream item for us.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
5 years agocleanup previous commit...
Wolfgang Bumiller [Wed, 16 Jan 2019 13:19:12 +0000 (14:19 +0100)]
cleanup previous commit...

This kind of notation is weird...

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
5 years agolisten on :: instead of 0.0.0.0
Wolfgang Bumiller [Wed, 16 Jan 2019 13:17:50 +0000 (14:17 +0100)]
listen on :: instead of 0.0.0.0

Since this supports both ipv6 & ipv4 unless v6only is
explicitly enabled.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
5 years agoserver/rest.rs: correctly pass query/url parameters
Dietmar Maurer [Wed, 16 Jan 2019 12:58:36 +0000 (13:58 +0100)]
server/rest.rs: correctly pass query/url parameters

5 years agoreduce compiler warnings
Dietmar Maurer [Wed, 16 Jan 2019 09:19:49 +0000 (10:19 +0100)]
reduce compiler warnings

5 years agoclient/catar_backup_stream.rs: new helper for catar uploads to server
Dietmar Maurer [Wed, 16 Jan 2019 09:15:39 +0000 (10:15 +0100)]
client/catar_backup_stream.rs: new helper for catar uploads to server

5 years agobackup/datastore.rs: use Arc for chunk_store references
Dietmar Maurer [Tue, 15 Jan 2019 11:36:16 +0000 (12:36 +0100)]
backup/datastore.rs: use Arc for chunk_store references

5 years agoapi3/admin/datastore/upload_catar.rs: implement upload future
Dietmar Maurer [Tue, 15 Jan 2019 10:38:26 +0000 (11:38 +0100)]
api3/admin/datastore/upload_catar.rs: implement upload future

5 years agoapi/router.rs: allow different types of api methods
Dietmar Maurer [Mon, 14 Jan 2019 11:26:04 +0000 (12:26 +0100)]
api/router.rs: allow different types of api methods

Added a prototype for file/backup uploads.

5 years agocatar: define all feature flags
Dietmar Maurer [Sat, 12 Jan 2019 15:49:02 +0000 (16:49 +0100)]
catar: define all feature flags

5 years agocatar/encoder.rs: allow to pass list of devices
Dietmar Maurer [Sat, 12 Jan 2019 14:43:20 +0000 (15:43 +0100)]
catar/encoder.rs: allow to pass list of devices

We can use this to implement the --one-file-system like options. This
is a bit more convenient, because this way we can select to include
multiple devices (which is required by container backups).

5 years agocatar/encoder.rs: disable backup of virtual file systems
Dietmar Maurer [Sat, 12 Jan 2019 10:56:53 +0000 (11:56 +0100)]
catar/encoder.rs: disable backup of virtual file systems

5 years agocatar/encoder.rs: only test fat attribute on MSDOS and FUSE file systems
Dietmar Maurer [Sat, 12 Jan 2019 09:28:26 +0000 (10:28 +0100)]
catar/encoder.rs: only test fat attribute on MSDOS and FUSE file systems

5 years ago/catar/encoder.rs: do not store data from virtual file systems
Dietmar Maurer [Sat, 12 Jan 2019 09:20:08 +0000 (10:20 +0100)]
/catar/encoder.rs: do not store data from virtual file systems

5 years agocatar/encoder.rs: add helpers to test file system type
Dietmar Maurer [Sat, 12 Jan 2019 08:18:21 +0000 (09:18 +0100)]
catar/encoder.rs: add helpers to test file system type

5 years agocatar/encoder.rs: pass magic fs number to encode_dir
Dietmar Maurer [Sat, 12 Jan 2019 07:51:04 +0000 (08:51 +0100)]
catar/encoder.rs: pass magic fs number to encode_dir