Tag Archives: backup
Backing up MySQL views
So my `mysqldump` script wasn’t backing up views. I found a good solution using information_schema on Stack Overflow: Backing Up Views with Mysql Dump.
Marking caches on my workstation
I added a CACHEDIR.TAG file to the following directories on my workstation:
- ~/.cache
- ~/.local/share/akonadi
- ~/.local/share/baloo
What is a database backup (back to the basics)
Today I saw What is a database backup (back to the basics), which I probably should have read more closely than I did.
Backup Thunderbird data
I wanted a backup of my Thunderbird data on my Debian desktop, and I created it like this:
jj5@tact:~$ tar -c -f jj5-.thunderbird.tgz --use-compress-program='pigz -p 7 --best' .thunderbird
Error in rsync protocol data stream
So I was running a backup with rsync and I saw this:
lib/mysql/ibdata1 437.40M 33% 4.53MB/s 0:03:10 inflate returned -3 (0 bytes) rsync error: error in rsync protocol data stream (code 12) at token.c(557) [receiver=3.1.2] rsync: connection unexpectedly closed (155602 bytes received so far) [generator] rsync error: error in rsync protocol data stream (code 12) at io.c(235) [generator=3.1.2]
The issue seems to be that if you’re using rsync compression and the remote file gets changed while the rsync copy is in progress then shit gets corrupted. My solution was to handle error level ’12’ and retry without compression. If the file changes while the rsync is in progress the file will be corrupt, so you shouldn’t rely on the integrity of such files.
Export Firefox bookmarks to an HTML file to back up or transfer bookmarks
MySQL Database Backup Methods
Today I searched for information about backing up MySQL databases and found Database Backup Methods which seemed to be a pretty good run down on what the options are.
My backup strategy at the moment uses mysqldump and there is an article about that too: Using mysqldump for Backups.