r/Paperlessngx • u/BlackHatCowboy_ • 23d ago
Avoiding clobbering in document_exporter
I just switched to using document_exporter for backups. I used to just back up the volumes with rsync, but once my hard drive actually died, I found that extremely difficult to restore. (It was only due to the advice from u/sogo00 -- thank you, by the way! -- that I had any idea what pitfalls there may be, and addressed some in advance; the restore took me multiple hours.)
I'm expecting this new method to be much, much better. But there's one thing that I'm not so sure is: I can't find information on whether exporting repeatedly to the same directory would rewrite everything each time, clobbering all the files and wearing the disk significantly more than rsync did with my previous backup setup. If that is indeed the default behavior, is there a simple way to get it not to clobber?
My only thought would be to make a tmpfs, export to there, and then use rsync, but I don't have enough RAM for that, and have not managed to figure out how to do that in chunks.
3
u/konafets 23d ago
> The document exporter is also able to update an already existing export. Therefore, incremental backups with rsync are entirely possible.
https://docs.paperless-ngx.com/administration/#backup
1
u/BlackHatCowboy_ 23d ago
For anybody trying to do what I'm doing, I want to note one pitfall I experienced. Because the docker container only sees the directories it has mounted, you by default have very few choices of where to export, with the export directory being one of those. So I just mounted my backup drive to the (empty) export directory -- but the container still didn't see it. After messing around, I found that the only way to get it to see it is:
It was very frustrating for a bit there, but now I've got it working.