Snapshot Specific Applications Individually

Zain

Contributor
Joined
Mar 18, 2021
Messages
124
Is it possible to have a Periodic Snapshot dedicated to a specific directory within a Dataset? It doesn't appear that there is an easy way to select a single folder, only the entire dataset.

Is the method here to create the snapshot for the dataset, and then exclude all other folders?

Scratch that, looks like exclude is only for child datasets, and not folders.

TIA - Nevermind, guess my answer is that it's all or nothing for snapshots of datasets.
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
Exactly, snapshots operate at the dataset level. Directories are a POSIX concept implemented somewhat independently of ZFS' concept of a dataset.
 

Zain

Contributor
Joined
Mar 18, 2021
Messages
124
Thanks. Is there a method to a specific app having its own dataset, rather than using the ix-applications dataset that is used for all apps? This might be the way to do what I'm trying to do.
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
I'm rather surprised that's not the default, to be honest.
 

Zain

Contributor
Joined
Mar 18, 2021
Messages
124
I wish it were. I'm actually not seeing or finding a way to do this?

I changed the title of the thread to a more appropriate title.
 

HITMAN

Dabbler
Joined
Nov 20, 2021
Messages
33
If i understand you correctly, this should resolve your problem.

1. Create Dataset from Storage menu for you app.
2. Install app into that dataset/folder.
3. Create periodic snapshot from DataProtection menu.
 

truecharts

Guru
Joined
Aug 19, 2021
Messages
788
I'm rather surprised that's not the default, to be honest.
Actually, it is the default:
PVC and ix-volumes storage is under ix-applications/releases/APPSNAME

All of which are datasets.
It's just not exposed to the replication GUI, as there are quite a number of caveats with replicating those.
 

Kris Moore

SVP of Engineering
Administrator
Moderator
iXsystems
Joined
Nov 12, 2015
Messages
1,471
Actually, it is the default:
PVC and ix-volumes storage is under ix-applications/releases/APPSNAME

All of which are datasets.
It's just not exposed to the replication GUI, as there are quite a number of caveats with replicating those.

This is correct. Almost everything under there is a dataset. However, If you want an easy-button for persistence for your containers that you can easily replicate, then host-volumes is your friend. You end up making ZFS dataset elsewhere on the pool, host-volume them into the container and then its far easier to move things around.
 
Last edited:

Zain

Contributor
Joined
Mar 18, 2021
Messages
124
Let me see if I can give it a whirl and report back. Thanks!
 

HarryMuscle

Contributor
Joined
Nov 15, 2021
Messages
161
Generally container applications are supposed to be replaceable, so backing up the actual application shouldn't be needed. It's the configuration data that's important. Could you create a dataset and point all configuration related folders for the application to this dataset and snapshot it?

Thanks,
Harry
 

ClassicGOD

Contributor
Joined
Jul 28, 2011
Messages
145
Like @HarryMuscle wrote:
Docker containers/apps do not contain any parament data. Every time you update a Docker application the container and all of the data in it gets destroyed and recreated from an image. You should not store any data inside the container - you will loose it on update.

During installation of most apps there will be a "Storage" step that allows you to configure required paths (the one with "Enable Custom Host Path" check boxes) that you can configure to point wherever you want. Like to the datasets you take snapshots of. Those paths should contain all config etc files that define the functionality and configuration of your app instance and should be the only part of an "app" you need to backup/snapshot. (TrueNAS k8s implementation will use few more directories behind the scenes but those shouldn't matter for app config/data)
 
Top