Unknown command "backup" for "incus admin os system"

As per Backup/Restore - IncusOS documentation I just tried taking a post-install backup but got the following error message:

$ incus admin os system backup incus-os-backup-post-install.tar.gz
Error: unknown command "backup" for "incus admin os system"

Was the command moved elsewhere? Looking around with the tab completion didn’t reveal its new location, but incus-os/incus-osd/internal/backup/backup.go at main · lxc/incus-os · GitHub shows it exists.

stgraber@dakara:~$ incus version
Client version: 6.18
Server version: 6.18
stgraber@dakara:~$ incus admin os system backup
WARNING: The IncusOS API and configuration is subject to change

Description:
  Backup the system

Usage:
  incus admin os system backup [<remote>:] <file> [flags]

Flags:
  -d, --data     Command data
      --target   Cluster member name

Global Flags:
      --debug          Show all debug messages
      --force-local    Force using the local unix socket
  -h, --help           Print help
      --project        Override the source project
  -q, --quiet          Don't show progress information
      --sub-commands   Use with help or --help to view sub-commands
  -v, --verbose        Show all information messages
      --version        Print version number
stgraber@dakara:~$ 

Interesting:

bastien@precision ~ % incus version
Client version: 6.17
Server version: 6.18
bastien@precision ~ % incus admin os system backup                                    
Error: unknown command "backup" for "incus admin os system"

My last update on Arch was just a few days ago, but indeed after the upgrade:

bastien@precision ~ % incus version               
Client version: 6.18
Server version: 6.18
bastien@precision ~ % incus admin os system backup
WARNING: The IncusOS API and configuration is subject to change

Description:
  Backup the system

Usage:
  incus admin os system backup [<remote>:] <file> [flags]

Flags:
  -d, --data     Command data
      --target   Cluster member name

Global Flags:
      --debug          Show all debug messages
      --force-local    Force using the local unix socket
  -h, --help           Print help
      --project        Override the source project
  -q, --quiet          Don't show progress information
      --sub-commands   Use with help or --help to view sub-commands
  -v, --verbose        Show all information messages
      --version        Print version number

Thanks! :folded_hands:t2:

Haha, yeah, it’s still very recent stuff :slight_smile:

The CLI actually was reworked a bit more recently so will look slightly different under Incus 6.19 (mostly introducing a bunch of sub-commands like incus admin os system storage edit instead of incus admin os system edit storage.

So moving the entity (storage) to be its own set of sub-commands (show/edit) rather than being an argument to a generic show/edit set of commands.

That’s basically the precursor for supporting incus admin os system storage info for example as the info type commands will need to have endpoint specific logic and so can’t just go through a generic function.

1 Like

Nice, that’s going to make it easier to discover the config “sections” we can edit!

You can do incus admin os system list on 6.18 to get those at least.

1 Like