Make sure to use the –databases option when backing up single MySQL databases

Targeting a single database with these options:

mysqldump -u MY_DB_BACKUP_USER -p MY_DB_NAME --add-drop-table --add-drop-database > my_db_name_mmddyyyy.sql

will successfully backup the database, but if you were to restore the database backup file back into a database with a newer schema (additional tables for example) like so:

mysql -u my_db_access_user -p MY_DB_NAME < my_db_name_mmddyyyy.sql

you would end up with a “merged” version of the database that would have new tables from the more recent schema and restored tables from the backup:

I learned this the hard way recently when attempting to restore a database to an earlier version following a failed Redmine 3.0.2 upgrade. While this didn’t break anything (other than maybe a future upgrade attempt that doesn’t properly handle existing tables), it wasn’t what I intended.

Going forward, if I want to backup a single database and have the backup file contain the statement necessary to first drop the database before restoring it (a full restore for example), I’ll need to call the mysqlbackup command like so:

mysqldump -u MY_DB_BACKUP_USER -p --databases MY_DB_NAME --add-drop-table --add-drop-database > my_db_name_mmddyyyy.sql

Note the --databases statement. If you didn’t know this, I hope it helps you from making the same mistake.

mount error (13): Permission denied

Running into cryptic errors really sucks, and this was certainly no exception. We had a Windows share provided to us that we wanted to mount to an Ubuntu 10.04 LTS server for general storage.

After reading the Ubuntu MountWindowsSharesPermanently wiki page and consulting the smbmount man page I came up with this new (initial) /etc/fstab entry:

//192.168.1.5/test-smb1 /mnt/it_hosted cifs credentials=/root/it_hosted_windows_share_mount.conf,iocharset=utf8,sec=ntlm2 0 0

The /root/it_hosted_windows_share_mount.conf file contained:

username=storageuser
password=SuperSecret
domain=example

I’ve substituted values of course. One thing to note is that if example.com were the real domain, I’ve made sure to use example as the value.

Then came the mount error (13): Permission denied error. I tried from a Windows box and was able to connect fine, so I knew that the server/share wasn’t the problem.

I then decided to call mount directly as shown here. After getting that working, I rechecked the syntax used in /etc/fstab and then finally looked at /root/it_hosted_windows_share_mount.conf again.

What do you know, the old & much despised EOL issue. After changing the DOS EOL to UNIX everything worked. I can’t count the number of times I’ve been bitten by that.

Re-enabling the prompt to install extension updates

Perhaps you just like to be in control of things, or perhaps it’s not really that but the lack of notification that there was an update and now something isn’t working right. Well, was it an update or something else?

That’s where I’m coming from. I received a very brief installation complete/success sort of fade in/out notification while using Mozilla Firefox for Android today and I’m still not 100% sure which app was responsible. But anyway, I digress.

Digging around I found the following descriptions of the options via the old UI that was tweaked back around version 10.

extensions.update.enabled

The options dialog has an “Automatically Update: Add-ons” checkbox.

extensions.update.autoUpdateDefault

The add-ons manager has an “Update Add-ons Automatically” check menu.

This gives a good breakdown:

That these are different settings and how they are different is unclear. The first one controls automatic checking and should be titled something like “Auto check for add-on updates.” The second, controls auto installation after detection and should be titled something like “Auto install detected updates.” And ideally, they should appear next to each other.

extensions.update.notifyUser

This appears to control whether the user is notified

So, if I set extensions.update.autoUpdateDefault to false, extensions.update.notifyUser to true and leave extensions.update.enabled set to the default of true I expect to be notified when extensions are ready to be updated.

For the Android version, I came across extensions.autoupdate.enabled, and Google searches aren’t telling me much. Perhaps I’ll check to see if there is a SVN or Git repo and check the code for clues.

Edit:

This Bugzilla page explains it well enough:

Background update of add-ons/addons: Make success notification/toast ‘Installation complete’ more informative or remove it

Edit #2:

I have extensions.update.enabled set to true which I hope is what caused Firefox to look for extension updates, app.update.autodownload set to disabled (through the official menu option) which I expect will stop automatic updates of the app itself and extensions.autoupdate.enabled set to false.

References

Adding a new disk (LVM) to a VMware Workstation Ubuntu VM

Note: There is a newer version of this document here.


For all steps listed, I’m working with an Ubuntu 10.04 LTS virtual machine. It consists of a single disk (/dev/sda) that I didn’t size properly when I originally created the VM.

Later I added a second disk (/dev/sdb, independent of snapshots) to hold audio files from ripping cds prior to transferring to them to a player. I did not add this disk to the existing logical volume.

Now we’re going add a third disk (/dev/sdc) to the VM and place it in the same volume group as the original disk to help alleviate the space problem as shown here:

df -h

Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/ubuntu-root
                      7.3G  6.5G  487M  94% /
none                  245M  264K  244M   1% /dev
none                  249M  1.1M  248M   1% /dev/shm
none                  249M   92K  249M   1% /var/run
none                  249M     0  249M   0% /var/lock
none                  249M     0  249M   0% /lib/init/rw
/dev/sda1             236M   54M  170M  24% /boot
/dev/sdb1              30G  497M   30G   2% /media/bucket
.host:/                79G   68G   12G  86% /mnt/hgfs

Continue reading