old article I wrote for the NOCOUG newsletter in 2002 about using OS snapshots for backups. This technique is still very much a valid and widely used technique to perform backups. The idea is simple:

"> old article I wrote for the NOCOUG newsletter in 2002 about using OS snapshots for backups. This technique is still very much a valid and widely used technique to perform backups. The idea is simple:

"> old article I wrote for the NOCOUG newsletter in 2002 about using OS snapshots for backups. This technique is still very much a valid and widely used technique to perform backups. The idea is simple:

" />
kennygorman

The love of Data, Database Engineering, Architecture, Entrepreneurship, and other assorted bits

Wayback Machine: snapshots still valid technique

10 May 2010

I came across this old article I wrote for the NOCOUG newsletter in 2002 about using OS snapshots for backups. This technique is still very much a valid and widely used technique to perform backups. The idea is simple:

  • Stop I/O temporarily
  • Snapshot the filesystem (OS snapshot, rsync, whatever)
  • Release I/O
  • Backup any logs needed to recover point in time

This technique works for many different data stores. In the article I only show Oracle. But many other databases have the same capabilities for backups. Here are some examples:

PostgreSQL:

SELECT pg_start_backup('label');
-- snapshot the DB here
SELECT pg_stop_backup();
-- backup wal logs here

You can find all the details of this kind of backup in the PostgreSQL docs.

MongoDB:

> use admin
switched to db admin
> db.runCommand({fsync:1,lock:1})
{
	"info" : "now locked against writes",
	"ok" : 1
}
// snapshot the DB here
> db.$cmd.sys.unlock.findOne();
{ "ok" : 1, "info" : "unlock requested" }

You can find the docs on this procedure on the MongoDB site.

I thought I would include the original article here even though it’s going on 8 years old!

OS Snapshots for Backup;
Utilizing operating system snapshots for quick and painless Oracle database backup and restore.
from VOL. 16, No. 2 · MAY, 2002 of the NOCOUG Journal