Downsampling PDFs to save space

One of the best things since sliced bread, IMHO, is automatic scan to email/pdf functionality on the multi-function copier/printer/scanner/fax.  This makes copying print articles easy so that you can send them to friends, or keep an article out of something you borrowed.  My personal philosophy is \”scan once, process as needed.\”  That means I scan at a high resolution, and go from there.

Now, say you want to share that article, whatever with your friend… and that high-res PDF is too big to email… or they have a slow net connection… you get the idea.  How do you shrink the PDF easily?  Ghostscript is part of the answer.  The other part is, write a script.  What we have below is a script that takes multiple input files and runs each of them through ghostscript with its screen settings and outputs it with _small at the end of the base filename.  Most of the logic in the script is just for parsing the file name and path to get the extension of the base filename in the right place.Continue reading

Encrypted, remote backup

So, I\’m a big fan of backups. I\’m a bigger fan of differential backups. My personal favorite method of doing them is using the rdiff-backup script on a linux box. What happens when you have sensitive information that you need to remotely backup. Do you upload a new encrypted file of everything every night? Do you have to download the whole file to get to one file? If you were using an encrypted tarball or sometype of encrypted loopback file, like truecrypt, then the answer would be yes. That is bad if you have a slow link. One way to solve that is to do encryption on each file. To do this we can use EncFS and sshfs. Both of these are in the default repositories for the current ubuntu versions.
Continue reading