From nobody Fri Mar 15 19:54:07 2024 X-Original-To: dev-commits-doc-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TxFLl1mhkz5CnDv for ; Fri, 15 Mar 2024 19:54:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TxFLl1Kx5z45L7; Fri, 15 Mar 2024 19:54:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710532447; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2tHUApcOC4cdyJur5IU0ZFvCbdtu9Hxu3TZEixgQMGs=; b=vwBnKprUJSIAWRJvlq+DgiG7k9sqD/fht5xwaQpaItkTL/R8tjN4+qKOe08A9gyRWHOMid VOn2cnfnazVu/Efntou9J/wOJGhuRS7mKGvD5Dlmlh4EtA2FCJFUcaGDX9XqnUTlONi5CW 5HfMDCquvNJby4oLXnSSmPp2z2uNCQy3/tMnicOa5dw9u+A9cIopCksB4brHycH9QBV/GT J5vRH/HxoJBMQQIuBkszNZao5timNpX1+GvwVfeZjxvrIQVScFkIoPOU+rYrmdwvjgxzba DCHP9vMG4Uzya/ix+bVKDKxxEoHMmvKBmVI9ao4Es8U30UNzfrIT6YJa8lgayw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1710532447; a=rsa-sha256; cv=none; b=xPIsnnrolVFiXuIhuoaqU2jxfCE5pZ2keWMxZ3TIC0lL1/rokbqKPkMKP7S78oqx8mLMve JzES9zr19P8C8evonLUFP/BNYJ26/B//LdKJkvpuBIEvm9LdAXum31QoMRP7Nn7bVlb57y vDk8W6VtZvzQK4H1rVLxa59/nwblPlE3N9RtLdf1G9bdEM6SLrnPM3QCzNS0Af9C0SkDLs 53SBRYPI9VXPGnnjdUCT0OMmdgtWOXaEpZfawoQXaon7bVRubjrwTqESKyDUh2hycp3eBT VgwkOhk26TS2AF2n+YwT/Jp9EVj1BtMuZGFvNX2EfGwV0kL8cVeGIQNppmowGw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710532447; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2tHUApcOC4cdyJur5IU0ZFvCbdtu9Hxu3TZEixgQMGs=; b=S9AMFshmv6XlAVT57rE/3AuBucq3CD3TWgCDdIX8RQIwEdyn9Vdy1aTyQuPu/dbb0+/+v8 03EYPv7WzHDimzjwxpM44u1Lj1b2GhA3i04dScTW99FLp64zGtAOk8EJr2fStuDeAoguPE Iv8hiHzy4DMXzXkYV2P1lOL7zL2vTuZAoUU87y/4rR35jUvrUooeSFuMozdbFm/D7HBhuW 5y6nREQhpUR6DR6isxto6aftnss+FACulM8JqclKsi9ml0+irvjAOl3DGK9AoRSzsfDtQT eZeZjQTidRvgsZyLdVXNfgNkEY7HjGkvnzz2WWatXZRB69KGG4OMgyq/1OfW3Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TxFLl0xnSzPrB; Fri, 15 Mar 2024 19:54:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42FJs7qB002903; Fri, 15 Mar 2024 19:54:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42FJs71E002900; Fri, 15 Mar 2024 19:54:07 GMT (envelope-from git) Date: Fri, 15 Mar 2024 19:54:07 GMT Message-Id: <202403151954.42FJs71E002900@gitrepo.freebsd.org> To: doc-committers@FreeBSD.org, dev-commits-doc-all@FreeBSD.org From: Joseph Mingrone Subject: git: b703716729 - main - Handbook/Storage: Various improvements List-Id: Commit messages for all branches of the doc repository List-Archive: https://lists.freebsd.org/archives/dev-commits-doc-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-doc-all@freebsd.org X-BeenThere: dev-commits-doc-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jrm X-Git-Repository: doc X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b70371672911f868db03219b549ec70ad0b65099 Auto-Submitted: auto-generated The branch main has been updated by jrm: URL: https://cgit.FreeBSD.org/doc/commit/?id=b70371672911f868db03219b549ec70ad0b65099 commit b70371672911f868db03219b549ec70ad0b65099 Author: Chris Moerz AuthorDate: 2024-03-15 19:28:25 +0000 Commit: Joseph Mingrone CommitDate: 2024-03-15 19:53:00 +0000 Handbook/Storage: Various improvements - Minor grammar updates - Add tip about replicating using ZFS snapshots - List popular backup utilities - When backing up, keep a list prime packages - Update sample CARP configuration - Add tip about sharing highly available storage across the network Reviewed by: emaste, jrm, Pau Amma Differential Revision: https://reviews.freebsd.org/D43948 --- .../content/en/books/handbook/disks/_index.adoc | 51 +++++++++++++--------- 1 file changed, 31 insertions(+), 20 deletions(-) diff --git a/documentation/content/en/books/handbook/disks/_index.adoc b/documentation/content/en/books/handbook/disks/_index.adoc index 862d5c5f46..11567f7ffb 100644 --- a/documentation/content/en/books/handbook/disks/_index.adoc +++ b/documentation/content/en/books/handbook/disks/_index.adoc @@ -1245,21 +1245,21 @@ Instead of writing files and directories, `dump` writes the raw data blocks that [NOTE] ==== -If `dump` is used on the root directory, it will not back up [.filename]#/home#, [.filename]#/usr# or many other directories since these are typically mount points for other file systems or symbolic links into those file systems. +If `dump` is used on the root directory, it will not back up [.filename]#/home#, [.filename]#/usr#, or many other directories since these are typically mount points for other file systems or symbolic links into those file systems. ==== When used to restore data, `restore` stores temporary files in [.filename]#/tmp/# by default. -When using a recovery disk with a small [.filename]#/tmp#, set `TMPDIR` to a directory with more free space in order for the restore to succeed. +When using a recovery disk with a small [.filename]#/tmp#, set `TMPDIR` to a directory with more free space for the restore to succeed. When using `dump`, be aware that some quirks remain from its early days in Version 6 of AT&T UNIX(R),circa 1975. The default parameters assume a backup to a 9-track tape, rather than to another type of media or to the high-density tapes available today. These defaults must be overridden on the command line. -It is possible to backup a file system across the network to a another system or to a tape drive attached to another computer. +It is possible to backup a file system across the network to another system or a tape drive attached to another computer. While the man:rdump[8] and man:rrestore[8] utilities can be used for this purpose, they are not considered to be secure. -Instead, one can use `dump` and `restore` in a more secure fashion over an SSH connection. -This example creates a full, compressed backup of [.filename]#/usr# and sends the backup file to the specified host over a SSH connection. +Instead, one can use `dump` and `restore` more securely over an SSH connection. +This example creates a full, compressed backup of [.filename]#/usr# and sends the backup file to the specified host over an SSH connection. .Using `dump` over ssh [example] @@ -1271,7 +1271,7 @@ This example creates a full, compressed backup of [.filename]#/usr# and sends th .... ==== -This example sets `RSH` in order to write the backup to a tape drive on a remote system over a SSH connection: +This example sets `RSH` in order to write the backup to a tape drive on a remote system over an SSH connection: .Using `dump` over ssh with `RSH` Set [example] @@ -1282,6 +1282,11 @@ This example sets `RSH` in order to write the backup to a tape drive on a remote .... ==== +[TIP] +==== +Systems using the crossref:zfs[,Z file system (ZFS)] can make use of man:zfs[8] for creating snapshots, as well as crossref:zfs[zfs-zfs-send,sending and receiving] them to/from remote systems. +==== + === Directory Backups Several built-in utilities are available for backing up and restoring specified files and directories as needed. @@ -1404,7 +1409,14 @@ To interactively restore files from a `dump` file on tape into the current direc The FreeBSD Ports Collection provides many third-party utilities which can be used to schedule the creation of backups, simplify tape backup, and make backups easier and more convenient. Many of these applications are client/server based and can be used to automate the backups of a single system or all of the computers in a network. -Popular utilities include Amanda, Bacula, rsync, and duplicity. +Popular utilities include: + + * Amanda (package:misc/amanda-server[] and package:misc/amanda-client[]), + * Bacula (package:sysutils/bacula13-server[] and package:sysutils/bacula13-client[]), + * Bareos (package:sysutils/bareos-server[] and package:sysutils/bareos-client[]), + * package:net/rsync[], + * package:sysutils/duply[], and + * package:sysutils/duplicity[]. === Emergency Recovery @@ -1414,6 +1426,7 @@ Create a print copy of the output of the following commands: * `gpart show` * `more /etc/fstab` +* `pkg prime-list` * `dmesg` Store this printout and a copy of the installation media in a secure location. @@ -1550,7 +1563,8 @@ For more details about `mdmfs`, refer to man:mdmfs[8]. FreeBSD offers a feature in conjunction with crossref:config[soft-updates,Soft Updates]: file system snapshots. -UFS snapshots allow a user to create images of specified file systems, and treat them as a file. +UFS snapshots allow a user to create images of specified file systems, and treat them as a file. If you are using the crossref:zfs[,Z file system (ZFS)], refer to crossref:zfs[zfs-zfs-snapshot,"Managing Snapshots"] on how to use snapshots. + Snapshot files must be created in the file system that the action is performed on, and a user may create no more than 20 snapshots per file system. Active snapshots are recorded in the superblock so they are persistent across unmount and remount operations along with system reboots. When a snapshot is no longer required, it can be removed using man:rm[1]. @@ -2380,30 +2394,25 @@ In the event of CARP interfaces going up or down, the FreeBSD operating system g A state change on the CARP interface is an indication that one of the nodes failed or came back online. These state change events make it possible to run a script which will automatically handle the HAST failover. -To catch state changes on the CARP interfaces, add this configuration to [.filename]#/etc/devd.conf# on each node: +To catch state changes on the CARP interfaces, add this configuration to [.filename]#/etc/devd.conf# on each node, while replacing `` with the virtual host id and `` with the associated interface name: [.programlisting] .... notify 30 { - match "system" "IFNET"; - match "subsystem" "carp0"; - match "type" "LINK_UP"; + match "system" "CARP"; + match "subsystem" "@"; + match "type" "MASTER"; action "/usr/local/sbin/carp-hast-switch primary"; }; notify 30 { - match "system" "IFNET"; - match "subsystem" "carp0"; - match "type" "LINK_DOWN"; + match "system" "CARP"; + match "subsystem" "@"; + match "type" "BACKUP"; action "/usr/local/sbin/carp-hast-switch secondary"; }; .... -[NOTE] -==== -If the systems are running FreeBSD 10 or higher, replace [.filename]#carp0# with the name of the CARP-configured interface. -==== - Restart man:devd[8] on both nodes to put the new configuration into effect: [source,shell] @@ -2525,6 +2534,8 @@ For this example, a standard UFS file system was used. To reduce the time needed for recovery, a journal-enabled UFS or ZFS file system can be used instead. ==== +Instead of using the highly available storage locally, it can also be shared to other computers on a network via crossref:network-servers[network-nfs,NFS], crossref:network-servers[network-iscsi,iSCSI], man:sshfs[1], or programs in ports (i.e. package:net/samba419[]). + More detailed information with additional examples can be found at http://wiki.FreeBSD.org/HAST[http://wiki.FreeBSD.org/HAST]. === Troubleshooting