Does nextcloud keep logs at all?
Linux Questions
Linux questions Rules (in addition of the Lemmy.zip rules)
- stay on topic
- be nice (no name calling)
- do not post long blocks of text such as logs
- do not delete your posts
- only post questions (no information posts)
Tips for giving and receiving help
- be as clear and specific
- say thank you if a solution works
- verify your solutions before posting them as facts.
Any rule violations will result in disciplinary actions
Hmm it does, but it seems it's only recording WARN level and above, if you were thinking of using it to track newly added files.
The file upload date is apparently in the database but there is a certain point where the CD thing becomes the easier option.
Use stat on a known file and check if it has a birth or change (metadata) or modify (content) date that matches the expected time frame. You might be lucky and find that one of them matches.
Though if there is a database available, that seems like a good option to query (he says, ignorant of whatever NC's DB looks like)
Oooh interesting, thanks! So, no created date is listed, and birth matches what it shows in the UI for created date, so is that the same thing?
But I notice there are options 'change' and 'modify'. Just before running this I moved the file into a different directory to test, and it seems the 'modify' date stayed the same, but 'change' got updated!
Access: 2026-01-11 20:27:56.158679457 +1300
Modify: 2025-07-01 12:34:00.702371789 +1200
Change: 2026-01-14 08:56:55.395383204 +1300
Birth: 2025-12-02 16:13:25.779311070 +1300
I will have a go at working out how to identify files based on this change date, thanks for the tip!
I'm also not sure about Nextcloud's DB, though I think it's a relational postgress DB so it's probably possibly to get the data I want from it relatively easily. But I'd much prefer a file system option if I can. I need this to be easily repeatable each year.
Edit: Ah shit, all of the files have a change date in 2025. Damn. I will have to look at the database and see what it looks like.
I've had a play in the database. I can find the files and folder structure, then there are version timestamps which are probably what I'm looking for. But marrying these up to actual files for copying is going to be messy. At this point I think I'm just going to spent the days copying data off disks into a record of the last archive, then keep this on disk for next year. Or once I have a reconstructed archive, I might be able to build an index from it.
I didn't really think about this when burning the original discs (other than "that's a problem for future Dave"), so I have folders plopped on discs that are not in the same structure as in Nextcloud, as I spread things around to get them to fit. Once I reconstruct a proper version and get up to date, I can probably build some sort of index for next time where if a file has changed or it's not in my index, then include it.