blog:backing_up_freenas_jails

Backing up a FreeNas jails

A simple script that backups up each JAIL in turn, sorted alphabetically by its name. An export requires the jail to be shutdown.

#!/bin/sh
# Backup each JAIL
# Will restart the jail if required

iocage list -h -s name | cut -f 2,3 | while read jail state; do
  test $state = "up" && iocage stop $jail
  iocage export $jail
  test $state = "up" && iocage start $jail
done

The images will be in /mnt/[pool]/iocage/images

  • blog/backing_up_freenas_jails.txt
  • Last modified: 2021/08/17 15:14
  • by brett