Cloning onto existing Linode gives error
Command run:
$ linode-cli linodes clone 10692855 --linode_id 10894671
Request failed: 400
┌errors──┬──────────────────────────────────────────────┐
│ field │ reason │
├────────┼──────────────────────────────────────────────┤
│ type │ A valid Linode type by that ID was not found │
│ region │ region is not valid │
└────────┴──────────────────────────────────────────────┘
Again, try adding a --no-defaults to the end of your CLI command.
Do you mind posting the contents of your ~/.linode-cli file using a command like this?
cat ~/.linode-cli | grep -v token
That should remove the tokens from the file before outputting it, but please double check. I'm most interested in what your config's region, type, and image are set to in the "DEFAULT" section.
I skipped setting any defaults during configure so here is my file:
$ cat .linode-cli | grep -v token
[DEFAULT]
region =
type =
image =
[pixelstore2]
region =
type =
image =
Now I get this error instead:
$ linode-cli linodes clone 10692855 --linode_id 10894892 --no-defaults
Request failed: 400
┌errors───────────┬───────────────────────────────────────────────────────────────────┐
│ field │ reason │
├─────────────────┼───────────────────────────────────────────────────────────────────┤
│ backups_enabled │ backups_enabled can only be provided when cloning to a new Linode │
└─────────────────┴───────────────────────────────────────────────────────────────────┘
🤔 that has the potential to be an API bug. What does this output?
linode-cli account settings --format backups_enabled
I'm going to make a ticket in our internal bug tracker for this, and I'll update it when I hear back from you.
$ linode-cli account settings --format backups_enabled
┌─────────────────┐
│ backups_enabled │
├─────────────────┤
│ True │
└─────────────────┘
I appreciate it. This is a useful tool for us!
Thank you, that's what I expected. I've updated our internal ticket for this, and based on our release schedule I would expect this to be fixed by Monday afternoon. In the meantime, you can temporarily disable this setting to get the clone to work:
linode-cli account settings-update --backups_enabled no
Running the same command with a "yes" at the end will turn it back on after the fact. Sorry for the inconvenience.
Closing as this issue seems to be resolved in my testing. Feel free to @ me if this issue is still occurring.