Commit Graph

87 Commits

Author SHA1 Message Date
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