Backup Countly Mongodb on specific date


#1

Hi ,
I have a question , is it possible for me to backup some collection like "carriers" on specific day everyday?
since i didnt see any "ts" on column "carriers" like in "logs{app_id}" . all i see in "carriers" is something like "app_id + year:month" on "_id"
thankyou :slight_smile:


#2

Problem is that data is scattered among multiple documents and largest of them, contains data about the whole year. So basically you would need to run a regex on _id field to dump data for this year and every day rewrite your dump with new one.


#3

thanks for the reply :slight_smile: ,
then the most i can do with _id is get the year:month using regex , and then give some timestamp on the dump result . is this correct?


#4

Basically yes. But such standard model data does not consume much space, I think it is easier to just dump whole collection on every backup.


#5

Thanks for the answer . it answered my question :slight_smile: