Purging, extracting, or compressing all attachments

I thought I loved the new attachment feature, until I noticed how enormous my Manager data file is getting. Especially with daily backups, it’s getting out of hand.

Is there a way to extract all my attachments to a separate file (or files), or at least a way to mass-delete or purge them from the Manager data file, or, failing that, to compress the file somehow? I have separate copies of everything I’ve attached in Manager and was just attaching copies to the invoices as a convenience, but now that I realize the cost of that convenience, I’m going to stop doing it going forward. Is there an easy way to remove my attachments without having to dig through one by one?

And this is strange. I started deleting attachments one by one by clicking the X next to the attachment at the bottom of the invoices they were attached to. After deleting quite a number of them, I saved a backup and closed Manager. I was surprised to find that the size of both the active data file and the backup file was exactly the same as it was before I deleted all of those attachments.

Apparently, clicking the X unlinks the attachment from the invoice but doesn’t actually purge the attachment from the data file. Is that correct, and if so, is there any way to purge and compress?

Click the file size number on the Businesses page. That will execute a vacuum command on the file. Normally, deleting things doesn’t restructure or compress the file.

Deleting the transaction without deleting the attachment does not reduce file size. Why is it so? How can I clean this up?

Read the previous answer.

Above answer (VACUUM) only works when the attachment was deleted before the record was removed. If the other way around, it is not working.

For greater visibility, I realized we need Attachments tab after all. This would allow to see orphaned attachments, do batch delete, search across all attachments etc.

So Attachments tab is now available in the latest version (19.10.32)

4 Likes

@lubos would it be possible to show the actual file size against the attachments rather than showing the equivalent in bytes? it would be better to show a measure which is consistent with the businesses page.

also, a link to the actual transaction record would help.

Any chance we can make it possible to hide this tab (i.e. allow it to be uncheck in customized) even though I do have attachments in my business files. Its a tab I’d like to turn on/off and take a look at occasionally rather than something I want displayed all the time. Since it is not really ‘transactional’ but more ‘maintenance’ in nature I don’t think it needs the same constraints on turning off as would a tab related to transactions. Or, maybe it could be relocated to settings instead of a tab, like other maintenance items such as chart maintenance etc

Thoughts?