|
A collection of useful facts by Joel Williams. Adelaide denizen. Computer tinkerer. Former terrestrial ecology student of Flinders University. PhD candidate at ANU. Editor for freshmeat.net. Adelaide University Mountain Club member and outdoor enthusiast. Occasional networking go-to guy. Contact me by email at joel at this domain. |
Dropbox Maildir BackupI made the following script:
#!/bin/bash
cd ~/Maildir/
for folder in .[a-zA-Z]*; do
if [[ $folder =~ "SPAM" ]]; then
echo "Skip"
else
echo -n "$folder.. "
tar cjf ~/Dropbox/Mail/mailbak$folder.tar.bz2 --exclude='dovecot*' --exclude='courier*' $folder/
echo "done"
fi
done
This tars up each maildir (not including my inbox) and puts it in Dropbox. I don't really want to have a copy of them on my main computer, so I just quit the Dropbox program to stop them from being synchronised :) It is my hope that the binary diff thing means that updating the tar files doesn't suck. I'd previously tried to back up to the clouds using un-archived maildirs, and this tended to crash things because of the large number of tiny files involved. The verdict? I'm not sure! I don't think the binary diff really worked well on this sort of archive. I will therefore therefore improve my script to split maildirs into a series of monthly files. This will have the classy bonus that I should only need to archive recently modified files. |