FAMP Stack w/ mysql on shared dataset

sdgenxr

Contributor
Joined
Sep 4, 2014
Messages
131
Two questions here. First, is it worth the effort to map the mysql data directory from the FAMP plugin to a shared dataset directory? My initial thoughts are yes so that I can save the database if my jail fails or other issues arise in the future.

Second, I noticed a community FAMP plugin and have installed it without any hiccups. However, when I try and map /var/db/mysql to a shared dataset, it says I cannot move the directory because the "Destination directory must be empty." Any thoughts on how to resolve this if the answer to the first question is yes?
 
Last edited:

gt2416

Patron
Joined
Feb 4, 2018
Messages
262
you can move the mysql folder to mysql1 or smthing, create a empty mysql folder, map the directory and copy the original folder back. Make sure you stop the mysql server while you do this.
 

Jailer

Not strong, but bad
Joined
Sep 12, 2014
Messages
4,977
You might want to read up on a proper way to backup your database for recovery purposes. Mysqldump is your friend here. The link below is for version 8 but just search for the documentation that's appropriate for the database version you are using.

https://dev.mysql.com/doc/refman/8.0/en/mysqldump.html
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
is it worth the effort to map the mysql data directory from the FAMP plugin to a shared dataset directory? My initial thoughts are yes so that I can save the database if my jail fails or other issues arise in the future.
It's always worth it to keep your data outside of the jail. Jails should be disposable and persistent data should be mounted in for the best jail operating outcome.
 
Top