Schedule a instance export --refresh?

Is it possible to schedule a “instance export --refresh” like you can schedule a snapshot? I could easily schedule it with cron but that would create a dependency outside of the incus framework.

No and it’s actually pretty tricky for us to do within Incus.

The reason for that is that Incus itself doesn’t store any relationship with other servers.
So if you have remote-a and remote-b in your incus client and then do incus copy remote-a:foo remote-b:foo --refresh, what actually happens is:

  • Client connects to remote-a and asks for a one-time token to retrieve foo and its snapshots
  • Client connects to remote-b and asks the server to create or fresh an instance named foo, it provides the IP address, public certificate and the token of remote-a as part of that
  • remote-b directly connects to remote-a using the one-time token to fetch the instance and its snapshots

The obvious problem there is that remote-b doesn’t have a permanent trust relationship with remote-a, in fact everything is designed around it very much not needing that, as a way to limit potential security exposure.

1 Like

Thank you for the info. Great to know.