SOLVED restore jails/plugins from Backup

Status
Not open for further replies.

MacGulliver

Cadet
Joined
Mar 24, 2015
Messages
2
Hi everyone,
i'm a long time reader, but this is my first post. First of all let me thank all of you, this is a great community.

Introduction:
i build my system in Oct. 2014 with only 2x3TB in Mirror for budget reasons. two weeks ago i upgraded with 3x3TB to a 5 drive raidZ2 Pool. To accomplish that i backed up my data via zfs send/recv to an eSATA drive, destroyed the mirror, build the raidZ2 and restored my data via send/recv. All went well as i can access my Data and even continue my TimeMachine Backup where i left it.

The Problem:
my plugins won't show up in GUI, but the corresponding jails were under the Jails section although i can't access a single one's WEB frontend or get any livesign at all.
I had several Plugins installed through the GUI (Sabnzbd...) and i although made two simple Jails not including a preconfigured Plugin. The custom Jails are functioning as before but the plugins won't show up.

What i tried so far:
  • checked the plugins location which is set correctly to the new pool (as i named it equal to my previous mirror) rebooted a couple of times -> no plugins.
  • deleted the jails and tried to restore with
    Code:
    zfs send -R backup/jails/sabnzbd_1@tobackup | zfs recv mymirror/jails/sabnzbd_1
    but now even the jails section is empty.
  • tried to install the Plugin first (worked fine) an send/recv from backup which told me something like
    the snapshot your sending is older than the destination
    sorry can't remember the full message.
  • tried to reinstall the plugin through GUI which responded
    warden: ERROR: A jail with this name already exists!
    because i restored the jail prior to reinstallation

what i was hoping to do:
just like the User "panz" pointed out a while back in this Thread: https://forums.freenas.org/index.php?threads/rebuild-pool-jails-config-question.21695/
i'd like to install a plugin to get it back in the GUI and after that restore the content of the Jail from my backup eSATA HDD.
But here is where i got stuck for the last 2 Days, i don't understand how i would accomplish that.

i'm not afraid of using the command line but completely new to BSD, ZFS and all the goodness, so could you please point me in the right direction?

thanks a lot
 

Robert Trevellyan

Pony Wrangler
Joined
May 16, 2014
Messages
3,778
If I'm following that thread, it's based on the assumption that the storage used by each plugin's jail was in a separate dataset and was allocated to the jail using the Add Storage dialog. If so, the idea would be that you could zfs send | zfs recv those datasets back independently of the presence or absence of the plugins or their jails.

By the way, the same thing happened to me the last time I reconfigured my pool the way you did, i.e. the data and jails were preserved but the plugins were gone.
 

MacGulliver

Cadet
Joined
Mar 24, 2015
Messages
2
so after a few days of digging i managed to get my jails back up and running.
here is what i did in case someone else stumbles over this issue:

  • installed all the plugins i had from scratch (via GUI)
  • shut down all plugins (GUI)
  • stopped all jails (GUI)
  • in CLI:
    Code:
    zfs destroy -rf mymirror/jails

  • Code:
    zfs send -R backup/jails@tobackup | zfs recv -v mymirror/jails
  • rebooted. I don't know if this step would be necessary but i thou it can't hurt
  • entered all jails one by one ->

in example for plexmediaserver_1 i did:
  • Code:
    jls
    to list all the Jails
  • Code:
    jexec [NUMBER OF JAIL] tcsh

  • edited the "/etc/rc.conf" inside every individual Jail
  • changed or added the
    plexmediaserver_enable="NO"
    to -->
    plexmediaserver_enable="YES"
  • Code:
    service plexmediaserver start 

All Jails came back online and i only had to add the Storage again as the links seemed to be broken. But other than that all data is as i left it before my backup.

hope that helps
 
Status
Not open for further replies.
Top