realm add sync job via CLI

Haaski

New Member
Oct 14, 2024
2
0
1
Since 8.x Proxmox supports scheduled realm sync.
adding it via GUI is easy and works like a charm.

any idea how I can add the sync schedule job via CLI?
cant find anything in the documentation how to add the schedule.

picture attached. I like to add this via CLI
 

Attachments

  • Selection_1391.jpg
    Selection_1391.jpg
    36.3 KB · Views: 5
Last edited:
Welcome to the Proxmox forum, Haaski!

Great that you enjoy the feature! If you haven't found it already, you can add a Realm Sync Job with pveum realm sync. You can use pveum help realm sync for more information on the parameters that you can pass to the CLI there.
 
pvesh create /cluster/jobs/realm-sync/<id> <options>

is the way todo it. With "pveum realm sync" setting the schedule is not supported
 
I'm sorry, I have misunderstood your question. You're right, it seems that it currently is not possible to create a Realm Sync job via any CLI tool as it is only exposed to the REST API. If you wish to have this feature included in a future PVE version, you're always encouraged to submit a feature request at our BugZilla [0].

[0] https://bugzilla.proxmox.com/enter_bug.cgi?product=pve&component=Backend
 
Shouldn't it be possible to call the REST api via curl to achieve this? This could be used to create a bash Script for doing the job.
 
Last edited:
Shouldn't it be possible to call the RESat api via curl to achieve this? This could je used to create a bash Script for doing the job.
If you haven't stumbled upon this before, there actually is a command line utility called pvesh [0], as mentioned correctly by OP in #3, where you can access the PVE API directly as if it was a REST API, but without using curl or similar tools.

[0] https://pve.proxmox.com/pve-docs/pvesh.1.html
 
  • Like
Reactions: Johannes S

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!