wm: doc

ref: d0a14a1a9a3eba92bc143f3d6bec3bc4d2a3cd84
dir: /backups.ms/

View raw version
.TL
Backups

.AU
mkf

.AB
In this article we disscus methods of
backing up and restoring data in Plan 9
.AE

.SH
Off-site backups
.LP
To take a off-site (archived) backup, you may use
.CW disk/mkfs
, for example:
.P1
; disk/mkfs -avpU -s /root /sys/lib/sysconfig/proto/allproto
.P2
Flag
.CW a
means writing the archive to the output, making it suitable
to pass the archive to a compress utility
such as
.CW bzip2.
.CW U
and
.CW p
means setting GID and UID of files as well as their premissions.
And finally,
.CW v
means show every file that is copied, it can be useful as a progress meter.
To reduce archive file, we use
.CW bzip2
since it offers a better balance compression ratio than
.CW gzip
or other formats:
.P1
; disk/mkfs -avpU -s /root /sys/lib/sysconfig/proto/allproto | bzip -9 > /tmp/bkup.bz2
.P2
taking backups to a local disk is usually faster than sending them to a remote storage
(
.CW sshfs
for example), because of reduced rtt, you may copy the archive later with
.CW fcp.


.SH
cwfs backups(?)
.LP
Consult copyworm as described in fsconfig(8)

To automate backups, one might consider mirroring the WORM to a remote disk (but test, the latency may be unacceptable)