Changes between Version 4 and Version 5 of FreeBSD ZFS Backup & Restore Full Instructions


Ignore:
Timestamp:
02/01/24 05:46:14 (4 months ago)
Author:
Paul Kulda
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • FreeBSD ZFS Backup & Restore Full Instructions

    v4 v5  
    2121
    2222
    23 * From here is where the fun begins :
    24   * to backup the zfs volume do the following,
     23* to '''backup''' the zfs volume do the following :
    2524  * zfs snapshot zroot/ROOT/default@backup
    2625  * then to do the actual backup
    27   * zfs send zroot/ROOT/default@backup > backup.zfs
     26  * zfs send zroot/ROOT/default@backup > backup.zfs (destination file does not matter but the @backup does, restore name must match.
    2827  * please '''Do Not''' zip the file
    2928  * you can for archiving purposes, but you need the raw file to restore.
     
    3130    * FreeBSD for some reason makes extra mount points on a default install
    3231    * I took the time to sort that out and stripped my backup down to the root only.
    33     *
    3432
    3533
    3634
     35* to restore a backup file to the zfs volume do the following :
     36  * You need to load FreeBSD from the cd as per usual, only the minimum install is required
     37  * When you load FreeBSD on a new drive intended for the restore
     38  * You will need to duplicate the structure of the way it was backed up.
     39  * for example i had to do a bunch of '''zfs destroy <mount i dont need>'''
     40  * before i could restore the file.
     41  * also keep in mind you probablyu have to backup all mount points seperately and restore them seperately ?
     42  * Launch the Installer CD (ZFS Versions must match or be higher, best to use the same Installer for all)
     43    * Once logged into the LiveCD you WILL need to '''zfspool import zroot'''
     44    * It will not mount but it loads the drivers needed to access the volume
     45    * next you will need to make a mount point for your data
     46    * use /tmp/<mountpoint> as it is already in ram and will allow mounts.
     47    * i used '''/tmp/tmp''' for example
     48    * Next depending on where the backup file is located,
     49      * For nfs
     50        * Run dhclient <interface> to get connected to a network
     51        * then mount_nfs - o soft ipaddress:/<mountpoint>
    3752
    3853
    39   * Once logged into the LiveCD you WILL need to '''zfspool import zroot'''
    40   * It will not mount but it loads the drivers needed to access the volume