I have some data from restic I’m trying to store for tracking progress.
As part of my restic run, I tag a snapshot with 1 or more values, depending what is it backing up. For example a backup job might backup my documents and my pictures. This would be tagged with --tag documents, --tag pictures.
Ideally I’d like to capture this in my influx record.
I’ve tried as part of a line protocol record:
backup,tag=pictures,tag=documents,host=Drogo time_taken=2160 1663159730000000000
But it complained about multiple tags. I could store it as tag1=pictures, tag2=documents - but would I be able to query for tag* = ‘documents’? ie if I have another record and it was tag1=documents and tag2=pictures.
tags are key value pairs. So the above is trying to set the tag key of “tag” to both “pictures” and “documents” for the same record.
Could you have a tag key of document_type with possible values of “picture”,“text”,“document” etc this assumes that each file can only have one document type.
If this didn’t provide enough information could you have a tag key of file_type with possible values of “document”,“binary”,“config” etc and a second tag key of “document_type” with values of “picture”,“text”,“document” etc which was set only when the file_type had a tag value of “document”
backup,file_type=binary,host=Drogo time_taken=2160 …
backup,file_type=document,document_type=“picture”,host=Drogo time_taken=2122 …
yeah because they were backup sets I was hoping that backup of just documents could have been tagged with documents. Then on a daily basis there might be a backup set where pictures, documents, videos we backed up.
I solved it by concatenating the values and I can use a regex to find all backup sets where documents have been involved.