Jail Backup before alternations? Simple Copy?

Status
Not open for further replies.

Jonathan N.

Cadet
Joined
Jun 2, 2014
Messages
1
Hey guys. I've been doing some Google searching, and forum searching on this topic but I can't seem to find a definitive answer.

Here's the scenario: I'm looking at altering some under the hood things on a Plex plugin jail. Also planning on doing some scripting and a few other things. My question is pretty simple. If I literally stop the jail, and do a cp of /mnt/StoragePool/jails/plexmediaserver_1/ to a new location. (Hey look I have a /mnt/StoragePool/Backups what I perfect place to put it.) If something gets seriously hosed can I simply stop the jail, replace plexmediaserver_1/ and start up the VM again to revert? Or are there more file related to the jail then that directory structure?

The question is serving double duty in that if this does work I want to backup my jails to an attached flash drive. I have Crashplan running on the system. In the event of a catastrophic failure the first thing I'd need to do is get FreeNAS up, then Crashplan to begin a restore.

Any insight you guys have would be appreciated. Thanks in advance.
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
Zfs snapshots should do what you want for making a local backup. I'm not sure of remote backup solutions other than replication using snapshots.
 

diskdiddler

Wizard
Joined
Jul 9, 2014
Messages
2,377
Yes this is absoloutely urgently needed, some way to do a definitive backup of jails, even if it's into a RAR file or something, if I could just have a cron job running once a week or SOMETHING which backs up jails entirely.

I've just foolishly clicked the published "update" button on a jail which has been modified and the update has completely trashed the jail and the contents, I'm not impressed. My fault? Yes. Lesson learnt? Yes - I need jail backups somehow.

Hell I don't even care if I simply run 8 jails, instead of 4 jails, except the "spare 4" jails are turned off? and the contents of jails 1 - > 4 are copied into jails 5->8 once / twice / three times a week?
Any suggestions here, really, really not happy right now :/
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
Did you even read any of the suggestions? I said snapshots are what you want.
 

diskdiddler

Wizard
Joined
Jul 9, 2014
Messages
2,377
Can you still navigate / browse a snapshot? I just wanted one particular file from my jail so I could "pull the file out" if that makes sense?
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
Yes you can snapshot anything, files directories and recursively, so create a snapshot schedule on your jail dataset and test it out.
 

diskdiddler

Wizard
Joined
Jul 9, 2014
Messages
2,377
Will it accidentally capture my /mnt/ point for the data?
All my jails mount back to my primary data array :/ so for example if I do an ls -laR /mnt/ARRAY/jails/ it will eventually hit the /jails/jailname/mnt/ and cycle back?

I only need the 1-4gb of the jail backed up, not the 11TB of stuff on the datastore, mounted within.
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
Shouldn't, just try it and see what happens. Or read the manual.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
Yes this is absoloutely urgently needed, some way to do a definitive backup of jails, even if it's into a RAR file or something, if I could just have a cron job running once a week or SOMETHING which backs up jails entirely.

There are. You can tarball up the jail and then do a reinstall later as a template file. You can even do snapshots and clones if you want(this is what I use).

But a built-in backup/migration tool in FreeNAS for the jails. Not happening anytime soon (the devs are adamantly against this and made it clear this is so in feature requests for this). There's too many things that you have to account for and deal with that isn't likely to actually work most of the time. It's a big can of worms so it's better to just not support it and leave it to the server admin (who has his own tools at his disposal if he is familiar with the technologies).
 

diskdiddler

Wizard
Joined
Jul 9, 2014
Messages
2,377
Is it in the manual, how to do a snapshot or clone? This should be included so we can just make a cron job which does it. It's kind of short sighted to omit simple backup tools :/
I just hope the tools don't try and backup /mnt/ within the jail, that would include all the data :)
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
Nope. It's about knowing how the technology works and applying it to your situation.
 

diskdiddler

Wizard
Joined
Jul 9, 2014
Messages
2,377
So what options are there to do it?
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
So what options are there to do it?

I already told you of the two I know of...

You can tarball up the jail and then do a reinstall later as a template file. You can even do snapshots and clones if you want(this is what I use).

It is really about understanding the technology and applying it.
 
Status
Not open for further replies.
Top