restore daemon: create /run/proxmox-backup on startup
fixes file restore again.
The new Memcom tracking file lives in `/run/proxmox-backup` and is
always created on REST interaction, as CachedUserInfo uses it to
efficiently track config changes, and such a cache is used in each
REST handle_request.
Further, the Memcom infra expects the base run PBS dir to exists
already, which is an OK assumption to have, but in the file-restore
daemon we have a significantly more minimal environment, and the run
dir was simply not required there, even /run isn't a tmpfs yet.
Fixes fda19dcc6f
("fix CachedUserInfo by using a shared memory version counter")
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
f4d371d2d2
commit
33d7292f29
|
@ -48,6 +48,10 @@ fn main() -> Result<(), Error> {
|
||||||
.write_style(env_logger::WriteStyle::Never)
|
.write_style(env_logger::WriteStyle::Never)
|
||||||
.init();
|
.init();
|
||||||
|
|
||||||
|
// the API may save some stuff there, e.g., the memcon tracking file
|
||||||
|
// we do not care much, but it's way less headache to just create it
|
||||||
|
std::fs::create_dir_all("/run/proxmox-backup")?;
|
||||||
|
|
||||||
// scan all attached disks now, before starting the API
|
// scan all attached disks now, before starting the API
|
||||||
// this will panic and stop the VM if anything goes wrong
|
// this will panic and stop the VM if anything goes wrong
|
||||||
info!("scanning all disks...");
|
info!("scanning all disks...");
|
||||||
|
|
Loading…
Reference in New Issue