restore

Linux backups: Using find, xargs, and tar to create a huge archive

I did something wrong in a previous blog entry that led me to use the pax command to create a large backup/archive. There’s nothing wrong with using pax — other than the fact that it’s not available for Cygwin — and I really needed to created a huge archive.

What wasn’t working

In my earlier blog post I stated that something like this did not work for me when trying to create a large backup using find, xargs, and tar:

find . -type f -name "*.java" | xargs tar cvf myfile.tar

What was happening was that as xargs was managing the input to the tar command, tar kept re-writing the archive. That is, each time xargs passed a new block of input files to tar, tar perceived it as a new command, and went on to re-create the file named myfile.tar. So, instead of the huge myfile.tar that I expected, I ended up with only a few files in the archive.

How to restore an Android emulator to its initial "factory" settings (wipe the data)

To restore an Android emulator to its initial, default settings, you need to find its “image” file on your filesystem and delete it. The image file will be found in your $HOME/.android/avd/<avdname>.avd folder.

For example, I was just working with an AVD named Nexus_6_API_21, and its directory on my Mac OS X system is /Users/al/.android/avd/Nexus_6_API_21.avd. I moved into that directory and found several “.img” files, deleted them, and then restarted the emulator, and it went back to its default settings.

iPad backup and restore tutorial

iPad backup/restore FAQ: How do I make an iPad backup? Also, how do I restore an iPad backup?

When it comes to making backups, the iPad is a curious device. The iPad isn't like a traditional computer where you say, "I want to backup folders X, Y, and Z." Curious about Apple's thinking, I've dug into the iPad backup and restore topic, and here's what I've found.

How to un-hide a hidden Mac OS X window

Mac OS X "hide" FAQ: How do I "un-hide" a hidden Mac Window (hidden Mac application)?

At one point or another every new Mac OS X user learns that you can easily hide a window on Mac OS X using the [Command][h] keyboard command, but that moment of fun is usually followed by a few moments of panic and terror and the thought "How do I un-hide/show/display a hidden Mac OS X window?"

Postgresql backup - how to backup a Postgres database

Postgresql Backup FAQ: How do I create a backup of a Postgresql database?

Solution: I create a Postgresql backup (a Postgresql dump) for this website using the pg_dump command, like this:

pg_dump -h db_server -U db_user -W db_name > db.20070725.dump
Password:

With this Postgres / pg_dump command I'm doing the following: