UFS: Maintenance

Using dump(8)

by ross at 17:40:32 on March 20, 2014

dump(8) flags:

  • -0 — zero level dump, full backup, guarantees the entire file system is copied
  • -L — dump live filesystem, i.e. currently mounted
  • -a — Bypass all tape length considerations, and enforce writing until an end-of-media indication is returned.
  • -f — file. Value "-" means stdout.

Dump the filesystems locally:

# dump -0Laf - / | gzip \
  > /share/backup/coffin.lan/root.2008-08-15.dump.gz

# dump -0Laf - /var | gzip \
  > /share/backup/coffin.lan/var.2008-08-15.dump.gz

# dump -0Laf - /usr | gzip \
  > /share/backup/coffin.lan/usr.2008-08-15.dump.gz

# dump -0Laf - /usr/home | gzip \
  > /share/backup/coffin.lan/home.2008-08-15.dump.gz

Dump the filesystems remotely:

# dump -0Laf - / | gzip \
  | ssh ross@striker dd of=/share/backup/coffin.lan/root.2008-08-15.dump.gz

# dump -0Laf - /var | gzip \
  | ssh ross@striker dd of=/share/backup/coffin.lan/var.2008-08-15.dump.gz

# dump -0Laf - /usr | gzip \
  | ssh ross@striker dd of=/share/backup/coffin.lan/usr.2008-08-15.dump.gz

# dump -0Laf - /usr/home | gzip \
  | ssh ross@striker dd of=/share/backup/coffin.lan/usr-home.2008-08-15.dump.gz

It is possible that you will see mixed output from ssh and dump or restore. Just remember that you are working with ssh and enter password if asked.

Basically this is how you create backups of UFS filesystems. Files /share/backup/coffin.lan/* can now be used to recreate the system, read on.

 

Comments