Difference between revisions of "Life Preserver/9.2/de"

From PC-BSD Wiki
Jump to: navigation, search
(Updating to match new version of source page)
(11 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
<noinclude>
 
<noinclude>
{{NavHeader/de|back=Adobe Flash Player preferences|forward=PC-BSD® Bug Reporting|custompagename=Life Preserver}}</noinclude>
+
{{NavHeader|back=Adobe Flash Player preferences|forward=PC-BSD® Bug Reporting}}</noinclude>
  
THIS PAGE IS CHANGING FOR 9.2
+
The built-in Life Preserver utility was redesigned for 9.2 to take full advantage of ZFS snapshot functionality. This utility now allows you to schedule snapshots of a local ZFS pool and to optionally replicate those snapshots to another system using SSH. This design provides several benefits:
  
The built-in Life Preserver utility [[File:Lifepreserver.png|thumb|'''Figure 8.19a: Life Preserver Icon in System Tray''']] allows you to automate backups of ''/usr/home/'' which contains the home directory for each user account created on the PC-BSD® system. Backups are stored on a remote system; for the purposes of this section, we will refer to the remote system as a backup server. [[File:Preserver1b.png|thumb|'''Figure 8.19b: Life Preserver Welcome Screen''']] Life Preserver uses SSH and rsync, meaning that the backup server must have SSH and rsync installed. If the backup server is another PC-BSD® system, these are already installed and configured for you. If the remote system is running another operating system, you will have to ensure that SSH and rsync are installed and that SSH is listening for connections. Regardless of the operating system on the backup server, you will need to open TCP ports 22 and 873 using the firewall software installed on the backup server.
+
* a snapshot provides a "point-in-time" image of the ZFS pool. In one way, this is similar to a full system backup as the snapshot contains the information for the entire filesystem. However, it has several advantages over a full backup. Snapshots occur instantaneously, meaning that the filesystem does not need to be unmounted and you can continue to use applications on your system as the snapshot is created. Since snapshots contain the meta-data ZFS uses to access files, the snapshots themselves are small and subsequent snapshots only contain the changes that occurred since the last snapshot was taken. This space efficiency means that you can take snapshots often. Snapshots also provide a convenient way to access previous versions of files as you can simply browse to the point-in-time for the version of the file that you need. Life Preserver makes it easy to configure when snapshots are taken and provides a built-in graphical browser for finding and restoring the files within a snapshot.
  
{{note|width=58%|icon64=you can also use {{citelink|url=http://www.freenas.org|txt=FreeNAS®}}, an open source networked attached storage (NAS) solution based on FreeBSD, as the backup server. Instructions for configuring FreeNAS® to accept Life Preserver backups can be found in the {{citelink|url=http://bsdmag.org/magazine/1756-protecting-dynamic-websites-in-freebsd|txt=September 2011 issue}} of BSD Magazine.}}
+
* replication is an efficient way to keep the files on two systems in sync. In the case of Life Preserver, the snapshots taken on the PC-BSD system will be synchronized with their versions stored on the backup server.  
  
Life Preserver is not the only way to make a backup. For example, you may find it easier to drag and drop the files/directories that you wish to backup to an external device, such as a USB drive, using one of the file manager utilities listed [[Files and File Sharing#File Managers and File Structure | File Managers]]. You can also find a few PBIs of backup utilities using AppCafe®. The advantage of Life Preserver is that it allows you to easily schedule backups of your home directory to a backup server.
+
* SSH means that the snapshots will be sent to the backup server oven an encrypted connection, which protects the contents of the snapshots.
  
=== Creating a Backup Schedule ===
+
* having a copy of the snapshots on another system makes it possible to restore the pool should your PC-BSD® system become unusable.
  
A shortcut to the Life Preserver utility, seen in Figure 8.19a, can be found in the system tray. This icon is animated and will indicate when a backup is taking place.
+
If you decide to replicate the snapshots to a backup server, keep the following points in mind when choosing which system to use as the backup server:
  
If you right-click the icon, the menu provides options to minimize (if the Life Preserver window is open), to perform a restore (if a backup exists), to start Life Preserver whenever the current user logs in, or to quit (remove the icon from the tray).
+
* the backup server ''' ''must be formatted with the latest version of ZFS,'' ''' also known as ZFS feature flags or ZFSv5000. Operating systems that support this version of ZFS include PC-BSD® 9.2, FreeBSD 9.2, and FreeNAS 9.1.x.
  
To start the backup wizard shown in Figure 8.19b, double-click the icon, or click ''[[Control Panel]]'' ➜ ''[[Life Preserver]]'', or type '''life-preserver''' at the command line.
+
* that system must have SSH installed and the SSH service must be running. If the backup server is running PC-BSD, you can start SSH using {{local|link=Service Manager}}. If that system is running FreeNAS, SSH is already installed. How to configure this service is described in {{local|link=Life_Preserver|anchor=Backing_Up_to_a_FreeNAS_System|Backing Up to a FreeNAS System}}. If the system is running FreeBSD, SSH is already installed.  
  
Once you click the "Get Started" button, the "Add New Life Preserver Wizard" will launch, allowing you to configure a backup. Click "Next" to see the screen in Figure 8.19c:
+
* if the backup server is running PC-BSD, you will need to open TCP ports 22 (SSH) using {{local|link=Firewall Manager}}. If the server is running FreeBSD and a firewall has been configured, add rules to open this port in the firewall ruleset. FreeNAS does not run a firewall by default.
  
[[File:Preserver1d.png|thumb|'''Figure 8.19c: Remote Device Configuration Screen''']]
+
[[File:Lifepreserver.png|thumb|'''Figure 8.19a: Life Preserver Icon in System Tray''']]
  
You will need to input the following information:
+
=== Managing Snapshots Using the GUI===
  
'''Host Name:''' of the remote system that will store your backup. If the backup server is on your local network, the host name must be in your hosts file or in the database of the local DNS server. You may find it easier to instead input the IP address of the backup server as this will eliminate any host name resolution problems.
+
An icon to the Life Preserver utility, seen in Figure 8.19a, can be found in the system tray.  
  
'''User Name:''' this user must have permission to log in to the system that will hold the backup. If the account does not already exist, you should create it first on the backup server.
+
To remove the icon from the system tray, right-click it. To re-add it to the tray, go to {{traverse|Control Panel|Life Preserver|here=Life Preserver}} or type '''pc-su life-preserver &''' at the command line. If your desktop manager does not provide a system tray, you will need to instead {{local|link=Life_Preserver|anchor=Managing_Snapshots_From_the_Command_Line|manage backups from the command line}}.
  
'''SSH Port:''' port 22, the default port used by SSH is selected for you. You only need to change this if the remote system is using a non-standard port to listen for SSH connections. In that case, use the up/down arrows or type in the port number.
+
To open the screen shown in Figure 8.19b, double-click the Life Preserver icon. Click the "+" button and select the name of the ZFS pool to backup. Unless you configured a custom pool name during installation, it will be ''tank''. This will launch the the "New Life Preserver Wizard", allowing you to configure the backup schedule. Click "Next" to see the screen in Figure 8.19c.
  
{{note|width=58%|icon64=if there is a firewall protecting the remote system, make sure that it allows connections to the specified port number from the IP address of the system that you wish to backup. If the backup server is running PC-BSD®, you can use [[Firewall Manager]] to add an entry for SSH.}}
+
[[File:Lpreserver1.png|thumb|'''Figure 8.19b: Life Preserver Screen''']]
 +
[[File:Preserver1e.png|thumb|'''Figure 8.19c: Snapshot Schedule Screen''']]
  
Once you click the "Next" button, you can decide whether or not to schedule regular backups, as seen in Figure 8.19d:
+
This screen is used to schedule how often a snapshot is taken of the system. The default is to perform one snapshot per day at 1:00 AM. You can either change the time that this one daily snapshot occurs or select to take a snapshot once every hour, 30 minutes, 10 minutes or 5 minutes.
  
[[File:Preserver2c.png|thumb|'''Figure 8.19d: Selection Screen to Automate Backups and Determine Their Frequency''']]
+
After making your selection, press "Next" to see the screen shown in Figure 8.19d.
  
By default, automatic backups are disabled, meaning you will have to manually start a backup when you wish to do so. If you decide to automate backups, you can choose to backup daily or weekly. After making your selection, click "Next" and you will see the informational message in Figure 8.19e:
+
[[File:Preserver2d.png|thumb|'''Figure 8.19d: Snapshot Pruning Screen''']]
  
[[File:Preserver3.png|thumb|'''Figure 8.19e: Life Preserver is Now Ready to Test the Connection to the SSH Server''']]
+
This screen schedules how long to keep the created snapshots on the PC-BSD® system. By default, the last 7 days of snapshots are stored. In other words, once a snapshot becomes older than 7 days, it is automatically deleted. You can select to either keep snapshots for so many days or to keep a certain quantity of snapshots.
  
Click the "Finish" button and a terminal will open where you can enter the password for the user account you specified, as seen in the example in Figure 8.19f:
+
After making your selection, press "Next" to see the screen shown in Figure 8.19e.
  
[[File:Preserver4.png|thumb|'''Figure 8.19f: Logging into the SSH Server''']]
+
[[File:Preserver3e.png|thumb|'''Figure 8.19e: Replication Server Screen''']]
  
If this is the first time using SSH to connect to this host, you will have to type '''yes''' to accept the RSA key fingerprint before being prompted to type in the password. If the connection is successful, the terminal will close and your new preserver will be listed in the main panel, shown in Figure 8.19g:
+
If you wish to keep a copy of the snapshots on another system, this screen is used to indicate which system to send the snapshots to. If you do not have another system available, you can click “Next” and then “Finish” to complete the configuration.
  
[[File:Preserver5a.png|thumb|'''Figure 8.19g: Life Preserver Shows a New Preserver''']]
+
If you do have another system available which is running the same version of ZFS and has SSH enabled, click the "Replicate my data" box, then input the following information. Before entering the information in these fields, you need to first configure the backup system. An example configuration is demonstrated in {{local|link=Life_Preserver|anchor=Backing_Up_to_a_FreeNAS_System|Backing Up to a FreeNAS System}}.
  
The entry contains the following information:
+
* '''Host Name:''' of the remote system that will store your backup. If the backup server is on your local network, the host name must be in your hosts file or in the database of the local DNS server. You may find it easier to instead input the IP address of the backup server as this will eliminate any host name resolution problems.
  
'''Backup Server:''' will indicate the user account and IP address of the backup server.
+
* '''User Name:''' this user must have permission to log in to the system that will hold the backup. If the account does not already exist, you should create it first on the backup server.
  
'''Last Backup:''' will indicate whether or not there is a last backup and if there is a successful backup, the time and date of that backup. If you chose to automate backups, the first backup will happen immediately. Otherwise, a backup will not occur until you press the "Start" button. How long the first backup takes depends upon the size of your home directory and the speed of your network.  If the backup is unsuccessful, logs can be found in ''/usr/local/share/lifePreserver/preservers/<preserver_name>/logs/''. {{citelink|url=http://stackoverflow.com/questions/4493525/rsync-what-means-the-f-on-rsync-logs|txt=This post}} explains the meaning of the various characters found in the logs.
+
* '''SSH Port:''' port 22, the default port used by SSH is selected for you. You only need to change this if the remote system is using a non-standard port to listen for SSH connections. In that case, use the up/down arrows or type in the port number.
  
'''Frequency:''' will indicate "disabled", "daily", or "weekly".
+
* '''Remote Dataset:''' input the name of an existing ZFS dataset on the backup server. This is where the backups will be stored. To get a list of existing datasets, type '''zfs list''' on the remote server. The "NAME" column in the output of that command gives the fullname of each dataset. Type the fullname of the desired dataset into this field. When selecting a dataset, make sure that the selected "User Name" has permission to write to the dataset.
  
'''Status:''' ''Running…'' indicates that the backup is occurring now, otherwise it will show as ''Not running''.
+
Once you have input the information, click "Next" and then "Finish". Life Preserver will check that it can connect to the backup server and will prompt for the password of "User Name". A second pop-up message will remind you to save the SSH key to a USB stick (as described below) as this key is required should you ever need to perform an {{local|link=Life_Preserver|anchor=Restoring_the_Operating_System_From_a_Replicated_Life_Preserver_Backup|operating system restore}}. It will then add an entry for the backup in the screen shown in Figure 8.19b.  
  
The backup will be stored on the remote system in the home directory of the user that was used by Life Preserver to login. The contents of the backup will be found in the ''life-preserver/<backup>/'' subdirectory where ''<backup>'' is named according to the date and time stamp of the backup. The contents of the directory will mirror the directory structure of your home directory, making it very easy to find and restore individual files or directories from the backup server to your PC-BSD® system.
+
{{note|icon64=If you don't receive the pop-up message asking for the password, check that the firewall on the backup system, or a firewall within the network, is not preventing access to the configured "SSH Port".}}
  
=== Configuration Options ===
+
==== Configuration Options ====
  
If you right-click a preserver and select "Edit", you will see the configuration screen shown in Figure 8.19h.
+
Click the entry for a backup to activate its configuration buttons, as shown in Figure 8.19f.
  
[[File:Preserver6b.png|thumb|'''Figure 8.19h: Life Preserver Configuration Options''']]
+
[[File:Preserver4b.png|thumb|'''Figure 8.19f: Life Preserver Entry''']]
  
This screen allows you to configure the following:
+
These buttons, from left to right, allow you to:
  
'''Number of backups to keep:''' make sure that there is enough disk space on the backup server to store this amount of backups. If you do daily backups, a setting of 7 will keep a week's worth. If you do weekly backups, a setting of 4 or 5 will keep about a month's worth.
+
* '''Enable backups of a new dataset:''' this button will be greyed out if you only have one pool and have already scheduled a backup of the pool. Otherwise, it will start the "New Life Preserver Wizard" as described above.
  
'''Remove incomplete or failed backups:''' by default, Life Preserver attempts to conserve disk space on the backup server by removing any failed backups. Uncheck this box if you are troubleshooting Life Preserver.<noinclude>[[category:troubleshooting]]</noinclude><!-- This category tag causes this page to be included -for referencing this topic -->
+
* '''Remove selected dataset from automatic backup:''' if you click this button, a pop-up message will ask if you wish to cancel snapshot creation and replication. If you click "Yes", another pop-up message will ask if you also want to permanently delete all of the snapshots currently stored on the local PC-BSD system.
  
'''Disable automatic backups:''' if this is selected, a backup will only occur when you manually press the "Start" button.
+
* '''Customize the backup configuration:''' this will open the screen shown in Figure 8.19g so that you can modify when the backups occur and how long they are stored on the backup server. If you click the "Replication" tab, you will see the screen shown in Figure 8.19h. This allows you to edit the connection information to the backup server. It also adds a "Frequency" option. By default, the backup occurs right after the snapshot is created. You can modify this so that the backup itself occurs at a set time, regardless of when the snapshots are created. For example, if you have configured snapshots to occur every 30 minutes but the replication frequency to occur daily at 2:00 AM, the newly created snapshots won't be copied to the backup server until 2:00 AM.
  
'''Backup daily:''' if this is selected, a backup will occur once per day.
+
* '''Manage SSH keys:''' after creating a backup entry, you should immediately generate an SSH key and copy it to a USB stick. To do so, click this button then click "Generate SSH Key". A pop-up message will indicate that the key was successfully generated. Then, insert a FAT32 formatted USB stick and mount it with {{local|link=Mount Tray}}. Then, click this button again and select "Copy To USB Stick".
  
'''Backup weekly:''' if this is selected, a backup will occur once per week.
+
* '''Make a new snapshot:''' click this button to create a backup now, instead of waiting for the schedule. You can create a snapshot before making changes to a file, so that you can preserve a copy of the previous version of the file. When creating a snapshot, a pop-up message will prompt you to input a name for the snapshot. Once you do, the "Latest Snapshot" field will show the name of the snapshot (with the date and time added). The snapshot itself happens instantaneously, however the replication of the snapshot to the backup server will take some time, depending upon the speed of the network and the size of the snapshot. The Life Preserver icon will change to indicate whenever a replication is in progress.  
  
'''Remote directory:''' a subdirectory with the name you specify will be created in the home directory of the user that logs in to the SSH server. This is the location where backups will be stored. The default subdirectory name is ''life-preserver''.
+
* '''Browse a snapshot:''' click this button to browse to the data stored in a snapshot. In the example shown in Figure 8.19i, two test snapshots have been taken: the first was taken on September 10 at 11:02 and the second was taken on September 10 at 11:09. The datasets contained within the ZFS pool are listed and if you hover over a dataset name, such as ''/usr/home/dru'', the available snapshots are listed. If you click a snapshot name, the contents of that dataset at that point in time will be displayed in the "Revert a file" screen. For example, if a file named ''/usr/home/dru/important.odt'' was modified at 11:05 and the user wished to access the previous version of that file, they could browse to it in the ''test-2013-09-10-11-02-23'' snapshot as that snapshot was taken before the file was modified. If you double-click a file, it will restore that file to the version it was at the time the snapshot was taken.
  
'''Modify include list:''' provides a graphical List Editor, seen in Figure 8.19i, for adding files/directories to include in the backup.
+
* '''Revert an entire data subset:''' use this option with care as it will restore every single file in the selected dataset to the point-in-time when the snapshot was taken. While this can sometimes be handy if you mess things up in a dataset, it will also overwrite all of the files that were modified since that point-in-time.
  
'''Modify exclude list:''' opens the List Editor in order to add the files/directories to exclude from backups.
+
[[File:Preserver5b.png|thumb|'''Figure 8.19g: Changing the Backup Schedule''']]
 +
[[File:Preserver6c.png|thumb|'''Figure 8.19h: Changing the Replication Schedule''']]
 +
[[File:Preserver7c.png|thumb|'''Figure 8.19i: Browsing Snapshots''']]
  
[[File:Preserver7b.png|thumb|'''Figure 8.19i: Using List Editor to Modify the Include List''']]
+
=== Managing Snapshots From the Command Line===
  
When using List Editor, it will indicate whether or not you are editing the include or the exclude list. Use the browse button to select the files or directories that you wish to include or exclude. Alternately, you can type in a wildcard. For example, to select all files ending in the ''.txt'' extension, input '''*.txt'''.
+
The '''lpreserver''' command line utility can be used to manage snapshots and replication from the command line of a PC-BSD® or TrueOS® system. This command needs to be run as the superuser. To display its usage, type the command without any arguments:
  
=== Restoring a Backup ===
+
{{txtbox|box='''lpreserver'''
 +
Life-Preserver
 +
<nowiki>---------------------------------</nowiki>
 +
Available commands
 +
{{nbsp|2}}cronsnap - Schedule snapshot creation via cron
 +
{{nbsp|7}}get - Get list of lpreserver options
 +
{{nbsp|2}}listcron - Listing of scheduled snapshots
 +
{{nbsp|2}}listsnap - List snapshots of a zpool/dataset
 +
{{nbsp|4}}mksnap - Create a ZFS snapshot of a zpool/dataset
 +
{{nbsp|1}}replicate - Enable / Disable ZFS replication to a remote system
 +
revertsnap - Revert zpool/dataset to a snapshot
 +
{{nbsp|4}}rmsnap - Remove a snapshot
 +
{{nbsp|7}}set - Set lpreserver options
 +
{{nbsp|4}}status - List datasets, along with last snapshot / replication date
 +
{{nbsp|5}}zpool - Manage a zpool by attaching / detaching disks}}
  
To restore files from a backup, right-click the preserver entry and select "Restore From". Life Preserver will query the backup server and show a list of available backups as seen in the example in Figure 8.19j:
 
  
[[File:Preserver8a.png|thumb|'''Figure 8.19j: Selecting a Backup from the List of Available Backups''']]
+
Each command has its own help text that describes its parameters and provides a usage example. For example, to receive help on how to use the '''lpreserver cronsnap''' command, type:
  
When reading the backup name, the number before the "T" is the date in YYYY-MM-DD format and the number after the T is the date stamp in HH_MM_SS format. Highlight the backup you wish to restore and click the "Select Backup" button to open the window seen in Figure 8.19k:
+
{{txtbox|box='''lpreserver help cronsnap'''
 +
Life-Preserver
 +
<nowiki>---------------------------------</nowiki>
 +
Help cronsnap
 +
Schedule a ZFS snapshot
 +
Usage:
 +
For a listing of all scheduled snapshots
 +
{{nbsp|1}}# lpreserver listcron
 +
{{nbsp|1}}or
 +
{{nbsp|1}}To start / stop snapshot scheduling
 +
{{nbsp|1}}# lpreserver cronsnap <dataset> <action> <frequency> <numToKeep>
 +
{{nbsp|1}}action = start / stop
 +
{{nbsp|1}}frequency = daily@XX / hourly / 30min / 10min / 5min
 +
{{nbsp|19}}^^ Hour to execute
 +
{{nbsp|1}}numToKeep = Number of snapshots to keep total
 +
Example:
 +
{{nbsp|1}}lpreserver cronsnap tank1/usr/home/kris start daily@22 10
 +
{{nbsp|1}}or
 +
{{nbsp|1}}lpreserver cronsnap tank1/usr/home/kris stop}}
  
[[File:Preserver9a.png|thumb|'''Figure 8.19k: Selecting the Files to Restore''']]
+
Table 8.19a shows the command line equivalents to the graphical options provided by the Life Preserver GUI. Note that some options are only available from the command line.
  
If you wish to restore an individual file or directory, input its full path. In the example shown in Figure 8.19k, the user is restoring the directory ''/usr/home/dru/Documents''--in other words, the ''Documents'' subfolder backed up from the home directory of the user named dru.
+
{{Tbl-init|caption=8.19a: Command Line and GUI Equivalents}}
 +
!'''Command Line'''   
 +
!'''GUI''' 
 +
!'''Description'''
 +
|-
 +
|cronsnap
 +
|Customize the backup configuration ➜ Local Snapshots
 +
|schedule when snapshots occur and how long to keep them; the "stop" option can be used to disable snapshot creation
 +
|-
 +
|get
 +
|
 +
|list Life Preserver options
 +
|-
 +
|listcron
 +
|main screen of Life Preserver
 +
|list which ZFS pools have a scheduled snapshot
 +
|-
 +
|listsnap
 +
|Browse a snapshot
 +
|list snapshots of specified dataset
 +
|-
 +
|mksnap
 +
|Make a new snapshot
 +
|create and replicate a new ZFS snapshot; by default, snapshots are recursive, meaning that a snapshot is taken of every dataset within a pool
 +
|-
 +
|replicate
 +
|Customize the backup configuration ➜ Replication
 +
|used to list, add, and remove backup server; read the '''help''' for this command for examples
 +
|-
 +
|revertsnap
 +
|Revert an entire data subset
 +
|revert dataset to the specified snapshot version
 +
|-
 +
|rmsnap
 +
|Remove selected dataset from automatic backup
 +
|deletes specified snapshot; by default, all datasets within the snapshot are deleted
 +
|-
 +
|set
 +
|
 +
|configures Life Preserver options; read '''help''' for the list of configurable options
 +
|-
 +
|status
 +
|main screen of Life Preserver
 +
|lists the last snapshot name and replication status
 +
|-
 +
|zpool
 +
|
 +
|used to attach/detach drives from the pool; read '''help''' for examples
 +
|-
 +
|}
  
If you just input the name of the file or directory and click the "Restore" button, it will be restored to its original location and replace any files with the same name at that location.
+
==== Mirroring the System to a Local Disk ====
  
If you instead check the "Restore Relative to specified directory" box, the selected file/directory will be restored to the location you specify.
+
In addition to replicating to a remote server, the '''lpreserver''' command also provides a method for attaching a new disk drive to an existing ZFS pool, and live-mirroring all data to that disk as data changes on the pool. The attached disk drive can be another internal disk or an external USB disk. When the new disk is attached for the first time, it will be erased and used solely as a mirror of the existing system drive. In addition, it will be made bootable, allowing you to boot from and use the new disk should the primary disk fail. In order to use this feature you will need the following:
 +
 
 +
* an internal or external disk drive that is the same size or larger than the existing system disk.
 +
 
 +
* since the disk will be formatted, it must be either blank or not have any data that you wish to keep intact.
 +
 
 +
* in order to boot from the disk should the primary disk fail, the system must support booting from the new disk. For example, if you are using a USB disk, make sure that the BIOS is able to boot from a USB disk.
 +
 
 +
The superuser can setup the new disk using the following command. Replace ''tank1'' with the name of your ZFS pool and ''/dev/da0'' with the name of the disk to format. For example, the first USB disk will be ''/dev/da0'' and the second internal hard disk will be ''/dev/ad1''.
 +
 
 +
{{txtbox|box='''lpreserver zpool attach tank1 /dev/da0'''}}
 +
 +
When the disk is first attached, it will be formatted and configured to mirror the existing disk. You can add multiple disks to the pool in this manner, giving any level of redundancy that you require.
 +
 
 +
Once the disk is attached, it will begin to resilvering. This process mirrors the data from the primary disk to the newly attached disk. This may take a while, depending upon the speed of the disks and system load. Until this is finished you should not reboot the system, or detach the disk. You can monitor the resilvering process by typing '''zpool status'''.
 +
 
 +
To get a listing of the disks in your mirror, run this command, replacing ''tank1'' with the name of the pool:
 +
 
 +
{{txtbox|box='''lpreserver zpool list tank1'''}}
 +
 
 +
If you are using an external drive, there may be occasions where you wish to disconnect the backup drive, such as when using a laptop and going on the road. In order to so this safely, it is recommended that you first offline the external disk using the following command:
 +
 
 +
{{txtbox|box='''lpreserver zpool offline tank1 /dev/da0'''}}
 +
 
 +
Then when you re-connect the drive, you can place it in online mode again using:
 +
 
 +
{{txtbox|box='''lpreserver zpool online tank1 /dev/da0'''}}
 +
 
 +
Sometimes, the disk name will change as a result of being disconnected. The '''lpreserver zpool list tank1''' command can be used to get the proper device ID.
 +
 
 +
If you wish to permanently remove a disk from the mirror, run the following command. If you decide to re-attach this disk later, a full disk copy will again have to be performed.
 +
 
 +
{{txtbox|box='''lpreserver zpool detach tank1 /dev/da0'''}}
 +
 
 +
{{note|in addition to working with mirrors, the '''lpreserver zpool''' command can also be used to manage a RAIDZ configuration, although you will probably not want to use external disks in this case.}}
 +
 
 +
===Backing Up to a FreeNAS System===
 +
 
 +
{{citelink|url=http://www.freenas.org|txt=FreeNAS®}} is an open source Networked Attached Storage (NAS) operating system based on FreeBSD. This operating system is designed to be installed onto a USB stick or CF card so that it is kept separate from the storage disk(s) installed on the system. You can download the latest version of FreeNAS® as well as a PDF of its Users Guide from the {{citelink|url=http://www.freenas.org/download-releases.html|txt=download page}} of the FreeNAS® website.
 +
 
 +
This section demonstrates how to configure FreeNAS® 9.1.1 as the backup server for Life Preserver to replicate to. It assumes that you have already installed this version of FreeNAS® using the installation instructions in the FreeNAS® 9.1.1 Users Guide and are able to access the FreeNAS® system from a web browser.
 +
 
 +
In order to prepare the FreeNAS® system to store the backups created by Life Preserver, you will need to create a ZFS volume, create and configure the dataset to store the backups, create a user account that has permission to access that dataset, and enable the SSH service.
 +
 
 +
In the example shown in Figure 8.19j, the system has three 40GB drives and the user has clicked Storage ➜ Volumes ➜ ZFS Volume Manager in order to create the ZFS volume.
 +
 
 +
[[File:Freenas1.png|thumb|'''Figure 8.19j: Creating a ZFS Volume in FreeNAS® 9.1.1''']]
 +
 
 +
Input a "Volume Name", drag the slider to select the number of disks, and click the "Add Volume" button. The ZFS Volume Manager will automatically select the optimal layout for both storage capacity and redundancy. In this example, a RAIDZ1 volume named ''volume1'' will be created.
 +
 
 +
To create the dataset to backup to, click the + next to the entry for the newly created volume, then click "Create ZFS Dataset". In the example shown in Figure 8.19k, the "Dataset Name" is ''backups''. Click the "Add Dataset" button to create the dataset.
 +
 
 +
[[File:Freenas2.png|thumb|'''Figure 8.19k: Creating a ZFS Dataset in FreeNAS® 9.1.1''']]
 +
 
 +
To create the user account, go to Account ➜ Users ➜ Add User. In the screen shown in Figure 8.19l, input a "Username" that will match the "User Name" configured in Life Preserver. Under "Home Directory", use the browse button to browse to the location that you made to store the backups. Input a "Full Name", then input and confirm a "Password". When finished, click the "OK" button to create the user.
 +
 
 +
[[File:Freenas3.png|thumb|'''Figure 8.19l: Creating a User in FreeNAS® 9.1.1''']]
 +
 
 +
Next, give the user permissions to the dataset by going to Storage ➜ Volumes, click the  + next to the name of the volume, click the + next to the name of the dataset, then click "Change Permissions" for the expanded dataset. In the screen shown in Figure 8.19m, change the "Owner(user)" and "Owner(group)" to the user that you created. Click "Change" to save the change.
 +
 
 +
[[File:Freenas5.png|thumb|'''Figure 8.19m: Setting Permissions in FreeNAS® 9.1.1''']]
 +
 
 +
Next, click on Shell and type the following command, replacing ''dru'' and ''volume1/backups'' with the name of the user, volume, and dataset that you created:
 +
 
 +
{{txtbox|box='''zfs allow -u dru create,receive,mount,userprop,destroy,send,hold volume1/backups'''}}
 +
 
 +
Click the x in the upper right corner to close Shell. Then, to enable the SSH service, go to Services ➜ Control Services, shown in Figure 8.19n.
 +
 
 +
[[File:Freenas4.png|thumb|'''Figure 8.19n: Start SSH in FreeNAS® 9.1.1''']]
 +
 
 +
Click the red "OFF" button next to SSH to enable that service. Once it turns to a blue "ON", the FreeNAS® system is ready to be used as the backup server.
 +
 
 +
To finish the configuration, go to the PC-BSD® system. In the Life Preserver screen shown in Figure 8.19e, use the IP address of the FreeNAS® system in the "Host Name" field, the name of the user you created in the "User Name" field, and the name of the dataset you created (in this example it is ''volume1/backups'') in the "Remote Dataset" field.
 +
 
 +
=== Restoring the Operating System From a Replicated Life Preserver Backup ===
 +
 
 +
If you have replicated the system's snapshots to a backup server, you can use a PC-BSD® installation media to perform an operating system restore or to clone another system. Start the installation as usual until you get to the screen shown in Figure 8.19o.
 +
 
 +
 
 +
[[File:Restore1.png|thumb|'''Figure 8.19o: Selecting to Restore/Clone From Backup''']]
 +
 
 +
Before you can perform a restore, the network interface must be configured. Click the "network connectivity" icon (second from the left) in order to determine if the network connection was automatically detected. If it was not, {{local|link=Network_Configuration|configure the network connection}} before continuing.
 +
 
 +
Next, click "Restore from Life-Preserver backup" and the "Next" button. This will start the Restore Wizard. Click "Next" to see the screen shown in Figure 8.19p.
 +
 
 +
[[File:Restore2.png|thumb|'''Figure 8.19p: Select the Backup Server''']]
 +
 
 +
Input the IP address of the backup server and the name of the user account used to replicate the snapshots. If the server is listening on a non-standard SSH port, change the "SSH port" number. Click "Next" to see the screen shown in Figure 8.19q.
 +
 
 +
[[File:Restore3.png|thumb|'''Figure 8.19q: Select the Authentication Method''']]
 +
 
 +
If you previously saved the SSH key to a USB stick, insert the stick then press "Next". Otherwise, change the selection to "Use password authentication" and press "Next". The next screen will either read the USB key or prompt for the password, depending upon your selection. The wizard will then attempt a connection to the server. If it succeeds, you will be able to select which backup to restore. After making your selection, the installer will proceed to the {{local|link=Disk Selection Screen}} shown in Figure 3.4e. After selecting the disk(s), the installer will show Figure 3.4f, but the ZFS datasets will be greyed out as they will be recreated from the backup during the restore. Press "Next" then "Next" to perform the restore.
  
 
<noinclude>
 
<noinclude>
 
{{refheading}}
 
{{refheading}}
 
[[category:Life Preserver]]
 
[[category:Life Preserver]]
[[category:Control Panel]]
+
[[category:Systemsteuerung]]
[[category:handbook]]
+
[[category:Handbuch]]
 
<languages/>
 
<languages/>
 
</noinclude>
 
</noinclude>

Revision as of 05:47, 18 December 2013

(Sorry for the inconvenience)

Contents

The built-in Life Preserver utility was redesigned for 9.2 to take full advantage of ZFS snapshot functionality. This utility now allows you to schedule snapshots of a local ZFS pool and to optionally replicate those snapshots to another system using SSH. This design provides several benefits:

  • a snapshot provides a "point-in-time" image of the ZFS pool. In one way, this is similar to a full system backup as the snapshot contains the information for the entire filesystem. However, it has several advantages over a full backup. Snapshots occur instantaneously, meaning that the filesystem does not need to be unmounted and you can continue to use applications on your system as the snapshot is created. Since snapshots contain the meta-data ZFS uses to access files, the snapshots themselves are small and subsequent snapshots only contain the changes that occurred since the last snapshot was taken. This space efficiency means that you can take snapshots often. Snapshots also provide a convenient way to access previous versions of files as you can simply browse to the point-in-time for the version of the file that you need. Life Preserver makes it easy to configure when snapshots are taken and provides a built-in graphical browser for finding and restoring the files within a snapshot.
  • replication is an efficient way to keep the files on two systems in sync. In the case of Life Preserver, the snapshots taken on the PC-BSD system will be synchronized with their versions stored on the backup server.
  • SSH means that the snapshots will be sent to the backup server oven an encrypted connection, which protects the contents of the snapshots.
  • having a copy of the snapshots on another system makes it possible to restore the pool should your PC-BSD® system become unusable.

If you decide to replicate the snapshots to a backup server, keep the following points in mind when choosing which system to use as the backup server:

  • the backup server must be formatted with the latest version of ZFS, also known as ZFS feature flags or ZFSv5000. Operating systems that support this version of ZFS include PC-BSD® 9.2, FreeBSD 9.2, and FreeNAS 9.1.x.
  • that system must have SSH installed and the SSH service must be running. If the backup server is running PC-BSD, you can start SSH using Diensteverwaltung. If that system is running FreeNAS, SSH is already installed. How to configure this service is described in Backing Up to a FreeNAS System. If the system is running FreeBSD, SSH is already installed.
  • if the backup server is running PC-BSD, you will need to open TCP ports 22 (SSH) using Firewall-Verwaltung. If the server is running FreeBSD and a firewall has been configured, add rules to open this port in the firewall ruleset. FreeNAS does not run a firewall by default.
Figure 8.19a: Life Preserver Icon in System Tray

Managing Snapshots Using the GUI

An icon to the Life Preserver utility, seen in Figure 8.19a, can be found in the system tray.

To remove the icon from the system tray, right-click it. To re-add it to the tray, go to Systemsteuerung → Life Preserver or type pc-su life-preserver & at the command line. If your desktop manager does not provide a system tray, you will need to instead manage backups from the command line.

To open the screen shown in Figure 8.19b, double-click the Life Preserver icon. Click the "+" button and select the name of the ZFS pool to backup. Unless you configured a custom pool name during installation, it will be tank. This will launch the the "New Life Preserver Wizard", allowing you to configure the backup schedule. Click "Next" to see the screen in Figure 8.19c.

Figure 8.19b: Life Preserver Screen
Figure 8.19c: Snapshot Schedule Screen

This screen is used to schedule how often a snapshot is taken of the system. The default is to perform one snapshot per day at 1:00 AM. You can either change the time that this one daily snapshot occurs or select to take a snapshot once every hour, 30 minutes, 10 minutes or 5 minutes.

After making your selection, press "Next" to see the screen shown in Figure 8.19d.

Figure 8.19d: Snapshot Pruning Screen

This screen schedules how long to keep the created snapshots on the PC-BSD® system. By default, the last 7 days of snapshots are stored. In other words, once a snapshot becomes older than 7 days, it is automatically deleted. You can select to either keep snapshots for so many days or to keep a certain quantity of snapshots.

After making your selection, press "Next" to see the screen shown in Figure 8.19e.

Figure 8.19e: Replication Server Screen

If you wish to keep a copy of the snapshots on another system, this screen is used to indicate which system to send the snapshots to. If you do not have another system available, you can click “Next” and then “Finish” to complete the configuration.

If you do have another system available which is running the same version of ZFS and has SSH enabled, click the "Replicate my data" box, then input the following information. Before entering the information in these fields, you need to first configure the backup system. An example configuration is demonstrated in Backing Up to a FreeNAS System.

  • Host Name: of the remote system that will store your backup. If the backup server is on your local network, the host name must be in your hosts file or in the database of the local DNS server. You may find it easier to instead input the IP address of the backup server as this will eliminate any host name resolution problems.
  • User Name: this user must have permission to log in to the system that will hold the backup. If the account does not already exist, you should create it first on the backup server.
  • SSH Port: port 22, the default port used by SSH is selected for you. You only need to change this if the remote system is using a non-standard port to listen for SSH connections. In that case, use the up/down arrows or type in the port number.
  • Remote Dataset: input the name of an existing ZFS dataset on the backup server. This is where the backups will be stored. To get a list of existing datasets, type zfs list on the remote server. The "NAME" column in the output of that command gives the fullname of each dataset. Type the fullname of the desired dataset into this field. When selecting a dataset, make sure that the selected "User Name" has permission to write to the dataset.

Once you have input the information, click "Next" and then "Finish". Life Preserver will check that it can connect to the backup server and will prompt for the password of "User Name". A second pop-up message will remind you to save the SSH key to a USB stick (as described below) as this key is required should you ever need to perform an operating system restore. It will then add an entry for the backup in the screen shown in Figure 8.19b.

ANMERKUNG: If you don't receive the pop-up message asking for the password, check that the firewall on the backup system, or a firewall within the network, is not preventing access to the configured "SSH Port".

Configuration Options

Click the entry for a backup to activate its configuration buttons, as shown in Figure 8.19f.

Figure 8.19f: Life Preserver Entry

These buttons, from left to right, allow you to:

  • Enable backups of a new dataset: this button will be greyed out if you only have one pool and have already scheduled a backup of the pool. Otherwise, it will start the "New Life Preserver Wizard" as described above.
  • Remove selected dataset from automatic backup: if you click this button, a pop-up message will ask if you wish to cancel snapshot creation and replication. If you click "Yes", another pop-up message will ask if you also want to permanently delete all of the snapshots currently stored on the local PC-BSD system.
  • Customize the backup configuration: this will open the screen shown in Figure 8.19g so that you can modify when the backups occur and how long they are stored on the backup server. If you click the "Replication" tab, you will see the screen shown in Figure 8.19h. This allows you to edit the connection information to the backup server. It also adds a "Frequency" option. By default, the backup occurs right after the snapshot is created. You can modify this so that the backup itself occurs at a set time, regardless of when the snapshots are created. For example, if you have configured snapshots to occur every 30 minutes but the replication frequency to occur daily at 2:00 AM, the newly created snapshots won't be copied to the backup server until 2:00 AM.
  • Manage SSH keys: after creating a backup entry, you should immediately generate an SSH key and copy it to a USB stick. To do so, click this button then click "Generate SSH Key". A pop-up message will indicate that the key was successfully generated. Then, insert a FAT32 formatted USB stick and mount it with Mount Tray. Then, click this button again and select "Copy To USB Stick".
  • Make a new snapshot: click this button to create a backup now, instead of waiting for the schedule. You can create a snapshot before making changes to a file, so that you can preserve a copy of the previous version of the file. When creating a snapshot, a pop-up message will prompt you to input a name for the snapshot. Once you do, the "Latest Snapshot" field will show the name of the snapshot (with the date and time added). The snapshot itself happens instantaneously, however the replication of the snapshot to the backup server will take some time, depending upon the speed of the network and the size of the snapshot. The Life Preserver icon will change to indicate whenever a replication is in progress.
  • Browse a snapshot: click this button to browse to the data stored in a snapshot. In the example shown in Figure 8.19i, two test snapshots have been taken: the first was taken on September 10 at 11:02 and the second was taken on September 10 at 11:09. The datasets contained within the ZFS pool are listed and if you hover over a dataset name, such as /usr/home/dru, the available snapshots are listed. If you click a snapshot name, the contents of that dataset at that point in time will be displayed in the "Revert a file" screen. For example, if a file named /usr/home/dru/important.odt was modified at 11:05 and the user wished to access the previous version of that file, they could browse to it in the test-2013-09-10-11-02-23 snapshot as that snapshot was taken before the file was modified. If you double-click a file, it will restore that file to the version it was at the time the snapshot was taken.
  • Revert an entire data subset: use this option with care as it will restore every single file in the selected dataset to the point-in-time when the snapshot was taken. While this can sometimes be handy if you mess things up in a dataset, it will also overwrite all of the files that were modified since that point-in-time.
Figure 8.19g: Changing the Backup Schedule
Figure 8.19h: Changing the Replication Schedule
Figure 8.19i: Browsing Snapshots

Managing Snapshots From the Command Line

The lpreserver command line utility can be used to manage snapshots and replication from the command line of a PC-BSD® or TrueOS® system. This command needs to be run as the superuser. To display its usage, type the command without any arguments:

lpreserver

Life-Preserver --------------------------------- Available commands   cronsnap - Schedule snapshot creation via cron        get - Get list of lpreserver options   listcron - Listing of scheduled snapshots   listsnap - List snapshots of a zpool/dataset     mksnap - Create a ZFS snapshot of a zpool/dataset  replicate - Enable / Disable ZFS replication to a remote system revertsnap - Revert zpool/dataset to a snapshot     rmsnap - Remove a snapshot        set - Set lpreserver options     status - List datasets, along with last snapshot / replication date

     zpool - Manage a zpool by attaching / detaching disks


Each command has its own help text that describes its parameters and provides a usage example. For example, to receive help on how to use the lpreserver cronsnap command, type:

lpreserver help cronsnap

Life-Preserver --------------------------------- Help cronsnap Schedule a ZFS snapshot Usage: For a listing of all scheduled snapshots  # lpreserver listcron  or  To start / stop snapshot scheduling  # lpreserver cronsnap <dataset> <action> <frequency> <numToKeep>  action = start / stop  frequency = daily@XX / hourly / 30min / 10min / 5min                    ^^ Hour to execute  numToKeep = Number of snapshots to keep total Example:  lpreserver cronsnap tank1/usr/home/kris start daily@22 10  or

 lpreserver cronsnap tank1/usr/home/kris stop

Table 8.19a shows the command line equivalents to the graphical options provided by the Life Preserver GUI. Note that some options are only available from the command line.

Table 8.19a: Command Line and GUI Equivalents [tables 1]
Command Line GUI Description
cronsnap Customize the backup configuration ➜ Local Snapshots schedule when snapshots occur and how long to keep them; the "stop" option can be used to disable snapshot creation
get list Life Preserver options
listcron main screen of Life Preserver list which ZFS pools have a scheduled snapshot
listsnap Browse a snapshot list snapshots of specified dataset
mksnap Make a new snapshot create and replicate a new ZFS snapshot; by default, snapshots are recursive, meaning that a snapshot is taken of every dataset within a pool
replicate Customize the backup configuration ➜ Replication used to list, add, and remove backup server; read the help for this command for examples
revertsnap Revert an entire data subset revert dataset to the specified snapshot version
rmsnap Remove selected dataset from automatic backup deletes specified snapshot; by default, all datasets within the snapshot are deleted
set configures Life Preserver options; read help for the list of configurable options
status main screen of Life Preserver lists the last snapshot name and replication status
zpool used to attach/detach drives from the pool; read help for examples

Mirroring the System to a Local Disk

In addition to replicating to a remote server, the lpreserver command also provides a method for attaching a new disk drive to an existing ZFS pool, and live-mirroring all data to that disk as data changes on the pool. The attached disk drive can be another internal disk or an external USB disk. When the new disk is attached for the first time, it will be erased and used solely as a mirror of the existing system drive. In addition, it will be made bootable, allowing you to boot from and use the new disk should the primary disk fail. In order to use this feature you will need the following:

  • an internal or external disk drive that is the same size or larger than the existing system disk.
  • since the disk will be formatted, it must be either blank or not have any data that you wish to keep intact.
  • in order to boot from the disk should the primary disk fail, the system must support booting from the new disk. For example, if you are using a USB disk, make sure that the BIOS is able to boot from a USB disk.

The superuser can setup the new disk using the following command. Replace tank1 with the name of your ZFS pool and /dev/da0 with the name of the disk to format. For example, the first USB disk will be /dev/da0 and the second internal hard disk will be /dev/ad1.

lpreserver zpool attach tank1 /dev/da0

When the disk is first attached, it will be formatted and configured to mirror the existing disk. You can add multiple disks to the pool in this manner, giving any level of redundancy that you require.

Once the disk is attached, it will begin to resilvering. This process mirrors the data from the primary disk to the newly attached disk. This may take a while, depending upon the speed of the disks and system load. Until this is finished you should not reboot the system, or detach the disk. You can monitor the resilvering process by typing zpool status.

To get a listing of the disks in your mirror, run this command, replacing tank1 with the name of the pool:

lpreserver zpool list tank1

If you are using an external drive, there may be occasions where you wish to disconnect the backup drive, such as when using a laptop and going on the road. In order to so this safely, it is recommended that you first offline the external disk using the following command:

lpreserver zpool offline tank1 /dev/da0

Then when you re-connect the drive, you can place it in online mode again using:

lpreserver zpool online tank1 /dev/da0

Sometimes, the disk name will change as a result of being disconnected. The lpreserver zpool list tank1 command can be used to get the proper device ID.

If you wish to permanently remove a disk from the mirror, run the following command. If you decide to re-attach this disk later, a full disk copy will again have to be performed.

lpreserver zpool detach tank1 /dev/da0
Template:Word-note/de in addition to working with mirrors, the lpreserver zpool command can also be used to manage a RAIDZ configuration, although you will probably not want to use external disks in this case.

Backing Up to a FreeNAS System

FreeNAS®[1] is an open source Networked Attached Storage (NAS) operating system based on FreeBSD. This operating system is designed to be installed onto a USB stick or CF card so that it is kept separate from the storage disk(s) installed on the system. You can download the latest version of FreeNAS® as well as a PDF of its Users Guide from the download page[2] of the FreeNAS® website.

This section demonstrates how to configure FreeNAS® 9.1.1 as the backup server for Life Preserver to replicate to. It assumes that you have already installed this version of FreeNAS® using the installation instructions in the FreeNAS® 9.1.1 Users Guide and are able to access the FreeNAS® system from a web browser.

In order to prepare the FreeNAS® system to store the backups created by Life Preserver, you will need to create a ZFS volume, create and configure the dataset to store the backups, create a user account that has permission to access that dataset, and enable the SSH service.

In the example shown in Figure 8.19j, the system has three 40GB drives and the user has clicked Storage ➜ Volumes ➜ ZFS Volume Manager in order to create the ZFS volume.

Figure 8.19j: Creating a ZFS Volume in FreeNAS® 9.1.1

Input a "Volume Name", drag the slider to select the number of disks, and click the "Add Volume" button. The ZFS Volume Manager will automatically select the optimal layout for both storage capacity and redundancy. In this example, a RAIDZ1 volume named volume1 will be created.

To create the dataset to backup to, click the + next to the entry for the newly created volume, then click "Create ZFS Dataset". In the example shown in Figure 8.19k, the "Dataset Name" is backups. Click the "Add Dataset" button to create the dataset.

Figure 8.19k: Creating a ZFS Dataset in FreeNAS® 9.1.1

To create the user account, go to Account ➜ Users ➜ Add User. In the screen shown in Figure 8.19l, input a "Username" that will match the "User Name" configured in Life Preserver. Under "Home Directory", use the browse button to browse to the location that you made to store the backups. Input a "Full Name", then input and confirm a "Password". When finished, click the "OK" button to create the user.

Figure 8.19l: Creating a User in FreeNAS® 9.1.1

Next, give the user permissions to the dataset by going to Storage ➜ Volumes, click the + next to the name of the volume, click the + next to the name of the dataset, then click "Change Permissions" for the expanded dataset. In the screen shown in Figure 8.19m, change the "Owner(user)" and "Owner(group)" to the user that you created. Click "Change" to save the change.

Figure 8.19m: Setting Permissions in FreeNAS® 9.1.1

Next, click on Shell and type the following command, replacing dru and volume1/backups with the name of the user, volume, and dataset that you created:

zfs allow -u dru create,receive,mount,userprop,destroy,send,hold volume1/backups

Click the x in the upper right corner to close Shell. Then, to enable the SSH service, go to Services ➜ Control Services, shown in Figure 8.19n.

Figure 8.19n: Start SSH in FreeNAS® 9.1.1

Click the red "OFF" button next to SSH to enable that service. Once it turns to a blue "ON", the FreeNAS® system is ready to be used as the backup server.

To finish the configuration, go to the PC-BSD® system. In the Life Preserver screen shown in Figure 8.19e, use the IP address of the FreeNAS® system in the "Host Name" field, the name of the user you created in the "User Name" field, and the name of the dataset you created (in this example it is volume1/backups) in the "Remote Dataset" field.

Restoring the Operating System From a Replicated Life Preserver Backup

If you have replicated the system's snapshots to a backup server, you can use a PC-BSD® installation media to perform an operating system restore or to clone another system. Start the installation as usual until you get to the screen shown in Figure 8.19o.


Figure 8.19o: Selecting to Restore/Clone From Backup

Before you can perform a restore, the network interface must be configured. Click the "network connectivity" icon (second from the left) in order to determine if the network connection was automatically detected. If it was not, configure the network connection before continuing.

Next, click "Restore from Life-Preserver backup" and the "Next" button. This will start the Restore Wizard. Click "Next" to see the screen shown in Figure 8.19p.

Figure 8.19p: Select the Backup Server

Input the IP address of the backup server and the name of the user account used to replicate the snapshots. If the server is listening on a non-standard SSH port, change the "SSH port" number. Click "Next" to see the screen shown in Figure 8.19q.

Figure 8.19q: Select the Authentication Method

If you previously saved the SSH key to a USB stick, insert the stick then press "Next". Otherwise, change the selection to "Use password authentication" and press "Next". The next screen will either read the USB key or prompt for the password, depending upon your selection. The wizard will then attempt a connection to the server. If it succeeds, you will be able to select which backup to restore. After making your selection, the installer will proceed to the Laufwerkauswahl shown in Figure 3.4e. After selecting the disk(s), the installer will show Figure 3.4f, but the ZFS datasets will be greyed out as they will be recreated from the backup during the restore. Press "Next" then "Next" to perform the restore.


Verweise


  1. http://www.freenas.org
  2. http://www.freenas.org/download-releases.html
Other languages:German 3% • ‎English 100% • ‎French 2%

Cite error: <ref> tags exist for a group named "tables", but no corresponding <references group="tables"/> tag was found