backups


Thu Feb 26 18:25:26 PST 2026, jrmu@inter9.org (104.167.242.140)
Update content in backups for Plan 9 4th ed

BACKUPS

OFF-SITE BACKUPS

disk/mkfs(8) can help prepare off-site backups. Before doing so, make sure to unmount /mnt/term if you are connected via drawterm, to avoid backing up your local disk:

; unmount /mnt/term

; disk/mkfs -avpU -s /root /sys/lib/sysconfig/proto/allproto > /tmp/bkup

-a writes the archive to standard output -v displays filenames, to show progress -p sets file permissions -U sets GID and UID of files

The archive can also be compressed:

; disk/mkfs -avpU -s /root /sys/lib/sysconfig/proto/allproto | bzip -1 > /tmp/bkup.bz2

See gzip(1) for gzip and bzip compression options.

It's recommended to first backup to a local disk, then using fcp(1) to copy the archive to remote storage. This can be combined with cpu(1)

CWFS

See copyworm in fsconfig(8).

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


Thu Feb 19 13:23:11 PST 2026, saeed@cloud9p.org (104.167.242.140)
backups

Backups

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

Off-site backups

To take a off-site (archived) backup, you may use disk/mkfs, for example:

; disk/mkfs -avpU -s /root /sys/lib/sysconfig/proto/allproto

Flag a means writing the archive to the output, making it suitable to pass the archive to a compress utility such as bzip2. U and p means setting GID and UID of files as well as their premissions. And finally, v means show every file that is copied, it can be useful as a progress meter.

To reduce archive file, we use bzip2 since it offers a better balance compression ratio than gzip or other formats:

; disk/mkfs -avpU -s /root /sys/lib/sysconfig/proto/allproto | bzip -9 > /tmp/bkup.bz2

taking backups to a local disk is usually faster than sending them to a remote storage (sshfs for example), because of reduced rtt, you may copy the archive later with fcp.

cwfs backups(?)

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)



Last modified Thu Feb 19 13:23:11 PST 2026 [ Current version | History | Create a new page ] About the server | Powered by Plan 9