Dietmar Maurer
2ae7d196b9
src/bin/proxmox-backup-client.rs: correctly strip file extension
2019-03-06 11:18:46 +01:00
Dietmar Maurer
9f91249351
src/bin/proxmox-backup-client.rs: impl restore
2019-03-06 11:02:08 +01:00
Wolfgang Bumiller
6716f30bbc
add protocol test client
...
This uses futures for everything which is mostly useful as a
test to see if the protocol crate's non-blocking I/O support
can handle it...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-03-06 10:26:12 +01:00
Dietmar Maurer
80822b95b1
src/bin/proxmox-backup-client.rs: sort list results
2019-03-06 07:20:51 +01:00
Dietmar Maurer
fba30411fb
src/bin/proxmox-backup-client.rs: allow to set backup-id
2019-03-06 07:02:52 +01:00
Wolfgang Bumiller
391d310741
backup_info: BackupDir shortcut
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-03-05 10:15:06 +01:00
Dietmar Maurer
3ec3ec3f9a
src/bin/proxmox-backup-client.rs: print backup duration
2019-03-05 08:11:40 +01:00
Dietmar Maurer
875fb1c01a
src/backup/datastore.rs: use unix epoch to create DateTime
...
To make sure that we have a timestamp without nanosecond.
2019-03-04 17:58:22 +01:00
Dietmar Maurer
9b492eb256
src/backup/datastore.rs: protect BackupDir fields, impl new()
2019-03-04 13:51:36 +01:00
Dietmar Maurer
1e9a94e579
src/backup/datastore.rs: protect BackupGroup fields, impl new()
2019-03-04 13:38:23 +01:00
Dietmar Maurer
cdebd467e6
src/bin/proxmox-backup-client.rs: simply log to stdout
2019-03-04 09:38:34 +01:00
Dietmar Maurer
219ef0e6ca
src/catar/encoder.rs: add verbose flags
2019-03-04 08:01:09 +01:00
Dietmar Maurer
597a92039e
src/bin/proxmox-backup-client.rs: rename create into backup
2019-03-03 11:46:53 +01:00
Dietmar Maurer
6f62c9240a
src/api2/admin/datastore.rs: imp delete_snapshot
2019-03-03 11:29:00 +01:00
Dietmar Maurer
e77a02ed87
catar api: cleanup parameter names
2019-03-03 09:48:32 +01:00
Dietmar Maurer
421c9ba1d9
src/bin/proxmox-backup-client.rs: use new json_object_to_query
2019-03-03 09:44:25 +01:00
Dietmar Maurer
f5f13ebc5a
src/tools.rs: new helper json_object_to_query
2019-03-03 08:51:37 +01:00
Dietmar Maurer
49dc074007
parameter name cleanups (use '-' instead of '_')
2019-03-02 16:34:10 +01:00
Dietmar Maurer
ad20d19877
src/api2/admin/datastore.rs: rename get_group_list to list_groups, cleanups
2019-03-02 16:28:36 +01:00
Dietmar Maurer
184f17afad
src/api2/admin/datastore.rs: impl list_snapshots
2019-03-02 16:20:50 +01:00
Dietmar Maurer
812c6f8716
src/api2/admin/datastore.rs: impl list_backup_groups
2019-03-02 11:29:05 +01:00
Dietmar Maurer
e909522f06
src/backup/datastore.rs: use timestamp with zone offset
2019-03-01 17:36:40 +01:00
Dietmar Maurer
17d6979afd
src/bin/proxmox-backup-client.rs: generate a log file
2019-03-01 09:35:41 +01:00
Dietmar Maurer
5a2892f0ae
src/bin/proxmox-backup-client.rs: use chrono::DateTime
2019-03-01 06:59:32 +01:00
Dietmar Maurer
51144821f9
src/bin/proxmox-backup-client.rs: login before starting backup
2019-03-01 06:48:41 +01:00
Dietmar Maurer
83b7db0209
src/api2/admin/datastore.rs: start prune api
...
just a dummy for now.
2019-02-27 16:53:17 +01:00
Dietmar Maurer
f98ea63de2
src/bin/proxmox-backup-client.rs: fix bash completion
2019-02-27 12:37:53 +01:00
Dietmar Maurer
25f1650b71
src/bin/proxmox-backup-client.rs: minor code cleanup
2019-02-27 07:21:57 +01:00
Dietmar Maurer
ae0be2dda9
src/bin/proxmox-backup-client.rs: allow to upload more that one directory
2019-02-26 12:27:28 +01:00
Dietmar Maurer
698d9d4402
src/cli/command.rs: add help command
2019-02-23 15:10:48 +01:00
Dietmar Maurer
8b6dd2240d
src/cli/command.rs::allow to generate ReST docu
2019-02-23 11:29:18 +01:00
Dietmar Maurer
33256db6dd
src/cli/command.rs: simplify cli handler
2019-02-22 11:15:10 +01:00
Dietmar Maurer
4de0e142a0
cleanup cli library structure
2019-02-21 09:08:03 +01:00
Dietmar Maurer
8cc0d6aff3
src/bin/proxmox-backup-client.rs: implement garbage-collection sub-command
2019-02-20 14:10:45 +01:00
Dietmar Maurer
8c75372b79
src/backup/datastore.rs: list_backups() - include list of index files
2019-02-20 13:37:44 +01:00
Dietmar Maurer
14691fc1f3
src/bin/test_chunk_size.rs: avoid compilöer warnings, exit after 1GB
2019-02-20 12:05:28 +01:00
Dietmar Maurer
1604ec2654
src/bin/test_chunk_size.rs: another chunker test - gather some stats
2019-02-20 11:50:10 +01:00
Dietmar Maurer
247cdbce72
src/api2/admin/datastore/catar.rs: allow to configure chunk-size
2019-02-19 15:19:12 +01:00
Wolfgang Bumiller
fc7f03523c
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>
2019-02-18 13:21:27 +01:00
Dietmar Maurer
51ebd07974
src/api_schema/router.rs: add docu for RpcEnvironmentType
2019-02-17 11:59:18 +01:00
Dietmar Maurer
ef2f2efbcc
improve api_schema module structure
2019-02-17 10:16:33 +01:00
Dietmar Maurer
dc9a007b11
rename src/api to src/api_schema
2019-02-17 09:59:20 +01:00
Dietmar Maurer
a8f268afbb
fix configuration dir permission
...
Carefully set and check permissions ...
2019-02-16 12:19:13 +01:00
Dietmar Maurer
151c6ce27d
src/client.rs: improve library structure and docu
2019-02-14 11:11:39 +01:00
Dietmar Maurer
0dffe3f99a
src/client/http_client.rs: try to login
...
use an environment var to store passphrase (PBS_PASSWORD)
2019-02-13 14:31:43 +01:00
Dietmar Maurer
33d64b81e0
src/bin/proxmox-backup-client.rs: define and use BackupRepository
2019-02-13 12:30:52 +01:00
Dietmar Maurer
e5064ba607
simplify backup lib structure (pub use xxx:*), improve doc
2019-02-12 14:13:31 +01:00
Dietmar Maurer
91a905b6dd
rename ImageIndex to FixedIndex
...
also changed the file extension fron .iidx to .fidx
2019-02-12 11:50:45 +01:00
Wolfgang Bumiller
9ac1045c7b
bin: manager: fixup datastore parameter name
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-02-12 10:39:11 +01:00
Dietmar Maurer
aa5a4060ab
bin/proxmox-backup-api.rs: improve error handling
2019-02-11 15:11:42 +01:00
Dietmar Maurer
4223d9f800
bin/proxmox-backup-proxy.rs: improve error handling
2019-02-11 14:43:26 +01:00
Wolfgang Bumiller
9d02e5c38a
proxy: use <configdir>/server.pfx for tls
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-02-04 15:19:32 +01:00
Wolfgang Bumiller
0d176f3681
proxy: use TLS via tokio-tls
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-02-04 14:56:07 +01:00
Wolfgang Bumiller
6285b251e7
don't hardcode /usr/share paths
...
Add a defines.mk file defining the standard default layout
for installation (PREFIX, DATAROOTDIR, LIBDIR etc.).
Add a $(JSDIR) variable and use env!("JSDIR") in place of
the hardcoded /usr/share/javascript/proxmox-backup path.
Have defines.mk include an *optional* local.mak to override
JSDIR to www/ during local development.
Add `make install` targets and remove debian/install.
Note that service files are now in $libdir/proxmox-backup/
as there's usually no point in starting them from the
command line, so /usr/sbin makes no sense.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-02-01 10:41:54 +01:00
Wolfgang Bumiller
8e4df103dd
remove useless command option from daemons
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-02-01 10:41:54 +01:00
Dietmar Maurer
9f49fe1d5d
avoid compiler warnings
2019-01-30 18:25:37 +01:00
Dietmar Maurer
d01e2420f7
load auth keys on startup
2019-01-29 17:21:58 +01:00
Dietmar Maurer
6c30068ebf
auth_helpers.rs: split code into separate file
2019-01-29 16:55:49 +01:00
Dietmar Maurer
39a90ca6c5
bin/proxmox-backup-api.rs: gererate secret for csrf token
2019-01-29 13:15:33 +01:00
Dietmar Maurer
8d04280b29
tools/ticket.rs: add basic ticket support
2019-01-29 12:59:07 +01:00
Dietmar Maurer
02c7a75520
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.
2019-01-28 13:29:58 +01:00
Dietmar Maurer
6049b71f41
api: pass RpcEnvirnment to api handlers
2019-01-26 14:50:37 +01:00
Dietmar Maurer
d96d82736d
use crate log and syslog
2019-01-26 10:56:11 +01:00
Dietmar Maurer
576e3bf252
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).
2019-01-22 12:10:38 +01:00
Dietmar Maurer
41c039e143
bin/proxmox-backup-client.rs: implement list command
2019-01-21 18:58:14 +01:00
Dietmar Maurer
ce7ba139f1
catar: improve bash completion
2019-01-20 09:55:20 +01:00
Dietmar Maurer
50cfb695ae
api/router.rs: rename ApiUploadMethod to ApiAsyncMethod
...
We can use this for uploads and downloads ...
2019-01-19 16:42:43 +01:00
Dietmar Maurer
728797d0c1
reduce compiler warnings
2019-01-18 16:50:15 +01:00
Dietmar Maurer
383e857749
move complete_file_name() helper into tools.rs
2019-01-18 13:42:52 +01:00
Dietmar Maurer
73e844dbfe
bin/proxmox-backup-client.rs: improve file name completion
2019-01-18 13:40:05 +01:00
Dietmar Maurer
ff3d3100d4
backup/datastore.rs: try to create useful directory layout
...
store/type/ID/TIME/xxx.yyy
2019-01-18 12:01:37 +01:00
Dietmar Maurer
244d9b17a8
bin/proxmox-backup-client.rs: implement file name completions - first try ...
2019-01-17 14:24:20 +01:00
Dietmar Maurer
83bdac1e3b
api3/admin/datastore/upload_catar.rs: verify content type ("application/x-proxmox-backup-catar")
2019-01-17 12:43:29 +01:00
Dietmar Maurer
0fe5d605e7
tools.rs: new helper required_string_param()
...
To extract parameters from Value.
2019-01-17 12:14:02 +01:00
Dietmar Maurer
23bb8780d4
proxmox-backup-client: implement upload to server
2019-01-17 11:38:22 +01:00
Wolfgang Bumiller
1dcd52e5df
cleanup previous commit...
...
This kind of notation is weird...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-01-16 14:19:13 +01:00
Wolfgang Bumiller
6a50b77e72
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>
2019-01-16 14:18:16 +01:00
Dietmar Maurer
4c0fd4871e
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).
2019-01-12 15:43:20 +01:00
Dietmar Maurer
02c7d8e522
catar: implement create
2019-01-07 13:25:41 +01:00
Dietmar Maurer
e86c49247e
bin/catar.rs: add list command
2019-01-06 17:42:23 +01:00
Dietmar Maurer
691c89a0fb
proxmox-backup-manager: add garbage collection cli
2019-01-04 11:34:32 +01:00
Dietmar Maurer
07b4694a33
cleanup crate names
2019-01-04 10:49:52 +01:00
Dietmar Maurer
4bdba5f4f1
rename backup-client to proxmox-backup-client
2019-01-04 10:41:37 +01:00
Dietmar Maurer
a689f6df0e
rename pbs to proxmox-backup-manager
2019-01-04 10:39:32 +01:00
Wolfgang Bumiller
4968bc3ac0
cli::command: wrap usage errors in a UsageError
...
So we can distinguish them and show usage output
conditionally.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-01-03 16:08:51 +01:00
Dietmar Maurer
ea4ea34baf
improve chunker speed (avoid modulo)
2019-01-03 14:35:19 +01:00
Dietmar Maurer
3329ae8c2e
add benchmark for chunker
...
We get about 300MB/s - so this is still not fast enough
Note: This is quite slow with debug target, so please compile with --release
2019-01-02 19:18:53 +01:00
Dietmar Maurer
594fa52016
disable debug code
2019-01-02 12:55:18 +01:00
Dietmar Maurer
5e7a09be0d
src/backup/archive_index.rs: use close() instead of flush()
...
Also pass a reference to the encoder.
2019-01-02 11:02:56 +01:00
Dietmar Maurer
94a882e900
src/backup/archive_index.rs: implement flush()
2018-12-31 18:01:07 +01:00
Dietmar Maurer
0433db1949
src/backup/archive_index.rs: first try
2018-12-31 17:30:08 +01:00
Dietmar Maurer
cb4412b18e
move chunker.rs to backup/
2018-12-31 15:46:16 +01:00
Dietmar Maurer
1c287cb19a
rc/catar/chunker.rs: first try
2018-12-31 13:01:06 +01:00
Dietmar Maurer
bf205f94c5
avoid compiler warnings
2018-12-31 10:54:25 +01:00
Dietmar Maurer
c60d34bdbf
new catar binary
...
currently used for debugging
2018-12-30 18:02:46 +01:00
Dietmar Maurer
a0cc09b5f0
src/catar/encoder.rs: fix binary format, write goodby table
...
We still ned to sort the table (BST) ...
2018-12-28 14:27:00 +01:00
Dietmar Maurer
fb8365b79f
catar/encoder.rs: first try
2018-12-27 13:15:47 +01:00
Dietmar Maurer
bcd879cfb3
backup-client: allow to specify directories (prepare for catar backup)
2018-12-27 10:11:11 +01:00
Dietmar Maurer
2d9d143a8f
backup-client: add optional chunk-size parameter
2018-12-21 11:18:08 +01:00
Dietmar Maurer
f0819fe5a5
backup-client: do not start garbage collection after backup
2018-12-21 09:24:55 +01:00
Dietmar Maurer
d62e6e2264
backup-client: use 1M chunks, make chunk_size configurable
2018-12-21 08:36:57 +01:00
Dietmar Maurer
c34eb16651
backup-clinet: specify target file name
2018-12-20 14:09:31 +01:00
Dietmar Maurer
fe0e04c69c
use proxmox-backup as package name
2018-12-20 10:45:14 +01:00
Dietmar Maurer
eae8aa3aa9
cleanups: avoid compiler warnings
2018-12-19 12:49:23 +01:00
Dietmar Maurer
3d5c11e5d2
start impl garbage collection
2018-12-18 11:06:03 +01:00
Dietmar Maurer
529de6c7a3
start implementing DataStore
2018-12-17 13:00:39 +01:00
Dietmar Maurer
4818c8b6f7
start implementing ImageIndexReader
2018-12-16 14:44:44 +01:00
Dietmar Maurer
a27a3ee4ba
avoid compiler warnings
2018-12-16 13:57:59 +01:00
Dietmar Maurer
4fbb72a8b4
image_index.rs: implement atomic write/rename
2018-12-16 13:39:21 +01:00
Dietmar Maurer
798881a68a
rebane ImageIndex to ImageIndexWriter
2018-12-16 11:51:16 +01:00
Dietmar Maurer
606ce64bb0
image_index.rs:write idx of chunks (use mmap)
2018-12-15 14:51:05 +01:00
Dietmar Maurer
f8838fe913
backup-client: add bash completion for datastore names
2018-12-15 11:24:39 +01:00
Dietmar Maurer
43eeef28d1
move file_chunker to tools
2018-12-15 11:14:41 +01:00
Dietmar Maurer
48e8689505
file_chunker: use Read trait
2018-12-15 11:08:49 +01:00
Dietmar Maurer
fc8b19368a
backup-client: pass chunk_size as parameter to file_chunker
2018-12-15 10:58:48 +01:00
root
a914a77448
backup-client: read file by chunks
2018-12-14 13:39:41 +01:00
root
ff5d37074d
bin/backup-client.rs: nbew tool to play with chunk store
2018-12-14 08:28:56 +01:00
Dietmar Maurer
30d2e99c77
implement completion functions
2018-12-12 12:19:26 +01:00
Dietmar Maurer
6460764dbb
cli/command.rs: add new type CliCommandMap
2018-12-11 11:31:36 +01:00
Dietmar Maurer
bf7f103944
implement builder pattern for CliCommand
2018-12-11 11:12:13 +01:00
Dietmar Maurer
baed30b702
cli/command.rs: implement prefix match
2018-12-10 18:13:55 +01:00
Dietmar Maurer
8f62336b0f
impl From for CommandLineInterface
2018-12-10 13:51:10 +01:00
Dietmar Maurer
9f6ab1fc58
rename CmdDef to CommandLineInterface
2018-12-10 13:40:10 +01:00
Dietmar Maurer
b7329c8a1a
src/cli/command.rs: move code into separate file
2018-12-10 13:36:52 +01:00
Dietmar Maurer
211fabd795
try to support nested cli command definitions
2018-12-10 13:28:38 +01:00
Dietmar Maurer
34d3ba52eb
api3/config/datastore.rs: implement delete
2018-12-09 16:52:32 +01:00
Dietmar Maurer
ea0b8b6ec0
bin/pbs-datastore.rs: start implementing cli commands
2018-12-09 11:59:32 +01:00
Dietmar Maurer
083418619e
move src/api/server.rs -> src/server/rest.rs
2018-12-05 10:16:23 +01:00
Dietmar Maurer
8adbdb0a54
fix file download, listen to 0.0.0.0
2018-12-01 15:21:25 +01:00
Dietmar Maurer
e3871182c5
rename bin to src/bin/api-test-server.rs
2018-11-30 12:48:45 +01:00