--- Begin Message ---
Thanks for answering all questions.
When does Proxmox VE backend calls functions from the plugin? The
backup/restore tasks/jobs are configured in our Backup Solution hence this
question.
Thanks
Prashant
-----Original Message-----
From: Fiona Ebner <f.eb...@proxmox.com>
Sent: 01 April 2025 01:37 PM
To: Prashant Patil <prashant.gamepa...@veritas.com>; Proxmox VE development
discussion <pve-devel@lists.proxmox.com>; Thomas Lamprecht
<t.lampre...@proxmox.com>
Cc: Anuradha Joshi <anuradha.jo...@veritas.com>; Sudhir Subbarao
<sudhir.subba...@veritas.com>; Jason Voneberstein
<jason.voneberst...@veritas.com>
Subject: Re: [pve-devel] About PVE Backup Integration Guide
CAUTION: This email originated from outside the organization. Do not click
links or open attachments unless you recognize the sender and know the content
is safe. If you believe this is a phishing email, use the Report to
Cybersecurity icon in Outlook.
Note there is a v6 of the patch series now [0].
Am 01.04.25 um 09:02 schrieb Prashant Patil:
> We have gone through plugins POD material; we have few questions from
> very little understanding about plugins:
>
> 1. Storage plugin
> 1. What is the main purpose of storage plugin?
The storage plugin is needed, so that users can configure your backup server as
a backup storage in Proxmox VE, i.e. select it when configuring a backup job or
starting a backup, list the backups and issue restore operations.
> 2. Do we need to implement our own storage plugin? Which all
> functions we need to implement?
Yes. Look at the example plugins [1][2] to see which methods are required.
> 2. Backup Provider plugin
> 1. What is the main purpose of backup provider plugin?
This is used by the Proxmox VE backend to interface with your backup
server/solution during backup and restore tasks.
> 2. Do we need to implement our own backup provider plugin? Which
> all functions we need to implement?
Yes. You need to implement all methods, but you can decide which backup and
restore mechanisms you want to implement. One for VMs and one for containers.
> 3. Which model this provider refers to - push model or pull model?
Not sure what you mean here. The Proxmox VE backend will call your plugins
methdos during backup. It's up to you how exactly you handle the data.
> 4. It looks like we have two main callback functions - job_hook()
> and backup_hook(). Who calls these functions and when do they
> get called?
They got replaced by job_init(), job_cleanup(), backup_init(),
backup_cleanup() etc. in v6 of the series, but the purpose is still the very
same. I'll just quote from [3]:
> In Proxmox VE, a backup job consists of backup tasks for individual
> guests. There are methods for initialization and cleanup of the job,
> i.e. job_init() and job_cleanup() and for each guest backup, i.e.
> backup_init() and backup_cleanup().
>
> The backup_get_mechanism() method is used to decide on the backup
> mechanism. Currently, 'file-handle' or 'nbd' for VMs, and 'directory'
> for containers is possible. The method also let's the plugin indicate
> whether to use a bitmap for incremental VM backup or not. It is enough
> to implement one mechanism for VMs and one mechanism for containers.
>
> Next, there are methods for backing up the guest's configuration and
> data, backup_vm() for VM backup and backup_container() for container
> backup, with the latter running
>
> Finally, some helpers like getting the provider name or volume ID for
> the backup target, as well as for handling the backup log.
>
> The backup transaction looks as follows:
>
> First, job_init() is called that can be used to check backup server
> availability and prepare the connection. Then for each guest
> backup_init() followed by backup_vm() or backup_container() and
> finally backup_cleanup(). Afterwards job_cleanup() is called. For
> containers, there is an additional backup_container_prepare() call
> while still privileged. The actual backup_container() call happens as
> the
> (unprivileged) container root user, so that the file owner and group
> IDs match the container's perspective.
See also the documentation for each method for more details.
> 5. backup_get_mechanism() - This function needs to be called by
> external backup product?
No, all the functions are called by the Proxmox VE backup stack during backup.
> 6. backup_vm() - This function needs to be called by external
> backup product? Does it support all disk formats and backed
> storages?
No. The Proxmox VE backend will call your implementation of this method during
backup of a VM guest.
[0]:
https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Flore.proxmox.com%2Fpve-devel%2F20250331132020.105324-1-f.ebner%40proxmox.com%2F&data=05%7C02%7CPrashant.Gamepatil%40veritas.com%7Ce8e90928ffbc4175ad0e08dd70f43d58%7Cfc8e13c0422c4c55b3eaca318e6cac32%7C0%7C0%7C638790916502870977%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=ZlxofWsel85kigkOw2RmCWnnQwrUyRatI1f6PAoXz%2BE%3D&reserved=0<https://lore.proxmox.com/pve-devel/20250331132020.105324-1-f.eb...@proxmox.com/>
[1]: BackupProviderDirExamplePlugin.pm in
https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Flore.proxmox.com%2Fpve-devel%2F20250331132020.105324-17-f.ebner%40proxmox.com%2F&data=05%7C02%7CPrashant.Gamepatil%40veritas.com%7Ce8e90928ffbc4175ad0e08dd70f43d58%7Cfc8e13c0422c4c55b3eaca318e6cac32%7C0%7C0%7C638790916502890406%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=hkNs3aKQpbYf7EE%2Fx4wIGrYBl%2B6UR9gaK5uLWPr6uvA%3D&reserved=0<https://lore.proxmox.com/pve-devel/20250331132020.105324-17-f.eb...@proxmox.com/>
[2]: BorgBackupPlugin.pm in
https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Flore.proxmox.com%2Fpve-devel%2F20250331132020.105324-18-f.ebner%40proxmox.com%2F&data=05%7C02%7CPrashant.Gamepatil%40veritas.com%7Ce8e90928ffbc4175ad0e08dd70f43d58%7Cfc8e13c0422c4c55b3eaca318e6cac32%7C0%7C0%7C638790916502904656%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=V2SpaW1FCtH8FN0i%2BuZxHU2W6T1gTEv%2FA4J%2FMOpwOQk%3D&reserved=0<https://lore.proxmox.com/pve-devel/20250331132020.105324-18-f.eb...@proxmox.com/>
[3]:
https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Flore.proxmox.com%2Fpve-devel%2F20250331132020.105324-13-f.ebner%40proxmox.com%2F&data=05%7C02%7CPrashant.Gamepatil%40veritas.com%7Ce8e90928ffbc4175ad0e08dd70f43d58%7Cfc8e13c0422c4c55b3eaca318e6cac32%7C0%7C0%7C638790916502917419%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=Y6V325iQiGAKzra%2BQm1LUzb4ELtn3VaRFaYjRGyKmpM%3D&reserved=0<https://lore.proxmox.com/pve-devel/20250331132020.105324-13-f.eb...@proxmox.com/>
Best Regards,
Fiona
This message was sent by an employee of Arctera.
--- End Message ---
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel