From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id 2C0EB92F50 for ; Thu, 16 Feb 2023 09:02:35 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 1568F25DF1 for ; Thu, 16 Feb 2023 09:02:35 +0100 (CET) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [94.136.29.106]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS for ; Thu, 16 Feb 2023 09:02:34 +0100 (CET) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id EE50A474DD for ; Thu, 16 Feb 2023 09:02:33 +0100 (CET) Date: Thu, 16 Feb 2023 09:02:26 +0100 From: Fabian =?iso-8859-1?q?Gr=FCnbichler?= To: Proxmox Backup Server development discussion , Thomas Lamprecht References: <20230213154555.49610-1-h.laimer@proxmox.com> <20230213154555.49610-2-h.laimer@proxmox.com> <1676378795.mvvh7qehki.astroid@yuna.none> <432ebac6-b8da-8a95-77a9-bd505c9e2742@proxmox.com> In-Reply-To: <432ebac6-b8da-8a95-77a9-bd505c9e2742@proxmox.com> MIME-Version: 1.0 User-Agent: astroid/0.16.0 (https://github.com/astroidmail/astroid) Message-Id: <1676533788.8uy0lutxkb.astroid@yuna.none> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-SPAM-LEVEL: Spam detection results: 0 AWL 0.127 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: Re: [pbs-devel] [PATCH proxmox-backup 1/4] api2: make remote for sync-jobs optional X-BeenThere: pbs-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox Backup Server development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Feb 2023 08:02:35 -0000 On February 15, 2023 12:40 pm, Thomas Lamprecht wrote: > Am 14/02/2023 um 15:33 schrieb Fabian Gr=C3=BCnbichler: >> On February 13, 2023 4:45 pm, Hannes Laimer wrote: >>> ... and update places where it is used. >>> A SyncJob not having a remote means it is pulling >>> from a local datastore. >> high level: I wonder whether we really need this for sync jobs, or wheth= er just >> having it for pull (or as a new API/CLI endpoint copy/move?) would be en= ough as >> a start? is there a use case for scheduled local syncing? >> =20 >=20 > Yes, e.g. existing ones could be: having a small and fast "incoming" data= store, > which avoids blocking guests on backups and has the "hot" set of snapshot= s (most > recent) available while using a slower, but huge second one for long term= archival. yeah, that one makes sense. > Future ones would be sync to a S3 backed object storage, which we probabl= y only > want to have done from existing data (similar to tape), but still avoid t= he media > catalogue and labelling overhead tape must have to be really useful. not sure - we'd probably also want to combine chunks into bigger objects fo= r S3 to save costs? but that is something we can evaluate when we start designin= g that feature in detail. > Another future one is removable datastores, which this is upfront work fo= r. While > we might not always have time trigged event there, its still useful to ha= ve use a > sync job for, e.g., hot-plug triggered events. could be implemented "inline", but yeah, having a list of "jobs to trigger"= is nicer and more flexible. why I asked the question is the following: - PullParameters is an internal implementaion detail, and can be refactored= like we want - SyncJobConfig is not - the naming of fields makes less sense now with non-remote usage, we need to store an additional user there if we want unprivileged local sync, and upgrading config files in place when it's not = just adding a new, optional field is yucky so I guess we could - live with the ugly config file/API/CLI parameters having remote optional = for the local case, job_owner/.. optional for the remote case, and remote_ns an= d remote_store fields that are actually local for the local case (that's just= what came up so far, maybe more) - split local and remote sync jobs (or copy and sync, or ..) into two diffe= rent configs so that each just has the fields it actually needs with names that = make sense - but also kinda meh > Besides that, I'm a bit reserved against adding a move that can cross dat= astore > boundaries, as doing that manually seems not that useful for any but the = smallest > PBS instances (especially on the snapshot level) and for others a sync + = prune > is normally better anyway. Moving groups and namespaces around in the sam= e datastore > OTOH would be useful for organizing purpose, and without crossing into an= other CAS > also simple to implement. yeah, move/copy would just be "alternative" endpoints for local pulling tha= t re-use the pull code under the hood, but expose a better set of API parameters/terminology. "move" could definitely restricted to intra-datasto= re operations, if we implement it.