Attachments in database rather than filesystem
Added by Robert Bielik about 11 years ago
I'm sure this issue has been discussed before, just haven't found the "why" yet. Is there a rationale for NOT storing attachments in the database ? This would make backup a snap, besides Mantis does just this ?
Replies (1)
RE: Attachments in database rather than filesystem - Added by Martin Denizet (redmine.org team member) about 11 years ago
Hello Robert,
In my Redmine instance, users frequently upload files above 50MB that would make my DB painfully big and unpractical to manage. Let me explain:
In Microsoft SQL Server, we estimate that above 256kB we better use filestreams which stores the file on the filesystem. The reason is that is messes the space allocation and will contribute reduce performances. Understand that the large blocks used by the files will make the spindles fly longer to retrieve records such as issues. Also maintenance tasks would be way more resource intensive.
I don't less about MySQL than SQL Server but the same principles apply.
For backups, I use BackupPC on a dedicated machine. It does differential backups of my Redmine files over SSH with Rsync and I have it configured to start a database dump before file backup. It runs approximately every 4 hours. My only complain would be that when generating tar files the headers are 32bits which create few problems when the file is above 2GB (Which is normal because created with a stream).
Anyhow, that solves my problem to synchronize DB and filesystem backups.
Cheers!