When disabling all replications jobs on a node is necessary

dmvillar

New Member
May 6, 2024
15
0
1
Hello, I see the need to be able to disable all replication jobs on a node as quite necessary.

I'll explain why, when restoring copies from PBS, the work can be intensive, and if replications are also occurring, the IO delay can make the entire node unstable.

I've had to stop replication jobs one by one on several occasions.

I understand that the primary focus in PVE is Ceph, but many of us use ZFS and replication.
 
Hey,

the easiest is probably something like
Code:
pvesh get /cluster/replication --output-format=json | jq '.[].id' | xargs -I ID pvesr disable ID

- pvesh get /cluster/replication --output-format=json will give you a list of all replication jobs
- jq '.[].id' will only take their id
- and xargs -I ID pvesr disable ID will disable them

To enable all of them again, just replace the pvesr disable with pvesr enable.


pvesh get /cluster/replication --output-format=json | jq '.[].id' | xargs -I ID echo "pvesr disable ID" will just print the commands that will be done, in case you want to dry run/test or maybe adapt this to a different situation.
 
Last edited:
  • Like
Reactions: UdoB
Hey,

the easiest is probably something like
Code:
pvesh get /cluster/replication --output-format=json | jq '.[].id' | xargs -I ID pvesr disable ID

- pvesh get /cluster/replication --output-format=json will give you a list of all replication jobs
- jq '.[].id' will only take their id
- and xargs -I ID pvesr disable ID will disable them

To enable all of them again, just replace the pvesr disable with pvesr enable.


pvesh get /cluster/replication --output-format=json | jq '.[].id' | xargs -I ID echo "pvesr disable ID" will just print the commands that will be done, in case you want to dry run/test or maybe adapt this to a different situation.


Thanks for your response.

I understand that as shell commands or scripts we can do almost anything, but it would be very practical to have a GUI option for something I find very necessary at certain times.

I think it would be very useful in many scenarios.