• dev
  • Device Snapshots Downloader

Hello,
I am in trouble for downloading Device >> Snapshots . It is easy task if it is few devices but when it comes to download snapshots of 4000 devices, akind of work load. Snapshots come in .gz file and when I extract them I got json file.
I found 2 API request regarding this, but it is unable to achieve my goal.

https://flespi.io/docs/#/gw/!/devices/get_devices_dev_selector_snapshots
https://flespi.io/docs/#/gw/!/devices/get_devices_dev_selector_snapshots_snapshot_selector

When I wrote to Flespi support team, they said some scripts can solve my problem, since I don't have enough knowledge to write script like that,so I browse the internet(github,stackoverflow) similar to this and cannot find it. So , I wrote to here and looking for someone help and appreciated for your help.

Have a nice day.

Regards,
Thein Htike.

    theinhtite Dear Thein, why are you need snapshots? You may consume device messages in real-time with direct call to device REST API.

    Snapshots are a kind of backup API (mostly internal for flespi) in case of urgent data loss and we do not guarantee any kind of snapshots availability for any period of time.

      shal Dear Shal, I needed snapshots because I set device message ttl to 1 day. So, snapshots will only available for 10 days. And I am planning to download 4500 devices snapshots everyday. Snapshots contain useful information for us, and we are going to archive it and so that we can extract later. We are going to backup like this for next 5 year.

        theinhtite If you set device messages ttl property to 10 days flespi will store latest 10 days history for you. With average daily message size of 1MB you end up with 10MB per device. flespi charges you $1 per 1000MB per month. With 1000 devices it will be approximately $10 per month.

        Have you calculated how much money you have spent on the development with snapshots especially since this is not recommended method to use for messages export by flespi team (we may delete snapshots when changing archive servers without prior notice)?

        I recommend you to use normal REST API for daily or monthly messages export, at the very end this will be really cheaper for you.

          theinhtite We provide snapshots as is, without any guarantee. That's why it is free. Use official API and flespi storage engine to receive guaranteed service backed by your charges. Use free services on your own risk.

            a month later

            Is the snapshot backup the full (from first message) or just 1 day message ?

              wseixas It is snapshot for all device messages at the moment of generation.

                Write a Reply...