Hello
I have a question about how to apply weekly backup plan to the servlets created automatically
const droplet = await client.droplets.create({
name: domain,
region: 'ams3',
size: 's-1vcpu-1gb',
image: snapshot_id,
ssh_keys: [await this.get_ssh_key()],
backups: true,
plan: 'weekly',
ipv6: false,
private_networking: true,
volumes: null,
tags: ['test'],
user_data
});
Field ‘plan’ doesn work in this context
Thank you …
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Hey @realmag777 👋
You’re almost there! The reason
plan
isn’t working is because it needs to be part of thebackup_policy
object, not a top-level field.You can find that information in the API docs here:
Here’s how to update your code:
- Bobby
Heya, @realmag777
On top of what’s already mentioned, you can use the API to check the backup status like this:
Regards