Monday, April 13, 2015

Getting old browser history for new PC

I just got a new PC.  I have a pretty complicated setup.  I run Linux and use KVM to run Windows 7 for Outlook and Powershell.  I run a lot of VMs.  And, whenever I get a new PC, I migrate the VMs from the old system to the new.  Before I do, I'm in a transition period where I just use virt-manager to run the old VMs off the old system and display on my new desktop (cuts down on monitors & keyboards.

So, I have my shiny new PC and I want to check on my BackupPC servers (I have 3 of them).  I usually just click on them in my quick-launch but the browser history is missing.  I decided to just look at the old history instead of launching the remote (old) version of FireFox for some reason.  And, besides, I need to move that info anyway.

My boss thinks my setup is nuts but he generously donated an extra 1TB drive for my VMs.  I create a VG for this disk and start carving off space.

# lvcreate -L 165G -n lv_oldol6 vg_tank
# mkfs.ext4 /dev/mapper/vg_tank-lv_oldol6

# mkdir /oldol6
# vi /etc/fstab   (add new file system)
# mount /oldol6

Now I have a place to store my data from my old system. So I mount the old system via SSH.

# yum install sshfs
# mkdir /ssh
# cd /ssh
# sshfs me@old.system.ip:/ /ssh/
# tar -cf - . | (cd /oldol6/ && tar -xf - )
# sync   (old sysadmin good luck command)
# updatdb
# locate places.sqlite   (I look for the one in the old place)
# sqlite3 /oldol6/.mozilla/firefox/umw8efgh.default/places.sqlite
SQLite version 3.7.17 2013-05-20 00:56:22
Enter ".help" for instructions
Enter SQL statements terminated with a ";"

sqlite> .mode column
sqlite> .header on
sqlite> .schema
sqlite> select url FROM moz_places where title LIKE '%backuppc%';

Ta-dahhh!  That worked nicely.  I find the URL I'm looking for.


No comments: