• SK

    SK

    1 year ago
    Hey guys, I was wondering how do you do automatic backup of the Fleet configs to like Gitlab/Github for versioning?
  • zwass

    zwass

    1 year ago
    You can use
    fleetctl get packs --with-queries
    and
    fleetctl get options
    to get most of this.
  • You can also use
    fleetctl apply
    in a CI pipeline so that all the changes flow from your repo to Fleet.
  • SK

    SK

    1 year ago
    Ow yes that is an option, I was thinking more like if you also want to get the hosts how you could do that and put that in version control.
  • Noah Talerman

    Noah Talerman

    1 year ago
    @SK you would like to be able to create a config file with your hosts in Fleet so you can commit that to a version control system?
  • SK

    SK

    1 year ago
    I was more like thinking
    fleetctl get hosts --json
    to have a view of the hosts for like when they go MIA and get removed from fleet you can have a list that you can use later to debug hosts that disappear but are still on and automatically create this and push to like a repo.
  • zwass

    zwass

    1 year ago
    You're in luck!
    fleetctl get hosts --json
    already exists 🙂
  • SK

    SK

    1 year ago
    Yes I know 😉 but was more thinking best practices on how to ship it to a repo
  • zwass

    zwass

    1 year ago
    Rather than shipping it to a repo, what about setting the host expiration to a longer duration (or off) and then hitting the API/fleetctl for that list of hosts to look into?
  • SK

    SK

    1 year ago
    Hey @zwass I just started using the expiration to declutter the db 😄 I think probably hitting the API every other day might be enough to get a list indeed and putting it somewhere just to have a list of systems we might be missing