The whole purpose of a NAS to keep data secure and resilient to data loss. Currently there is no way to backup and restore applications.
Thoughts:
First party implementation by ix systems
Simple
Application independent
Backup and restore applications
Restoring/Backup application configuration and data set
Granular restore/backup individual applications
Restore applications even on a new Truenas Scale system from backup
End-user should be able to browse application data through a file explore
Application Backups/Restore should be plug-and-play. No other NAS software has implemented such a system that is open source. Third party isnât good enough due to complexity.
React to the post with âthumbs upâ or âdownâ
Thatâs apart of the scope of work we are doing in the new Apps implementation. Idea is to keep nearly all application config on-data pool, and if we have specific things land in our DB, provide an export / import functionality as well. We want to make it super simple to migrate an Apps workload to a new system and bring it back with minimal fuss.
Once the team is further along with the design phase can you break that down from a technical perspective and the end-user experience for community feedback? Perhaps that could be here or a blog post?
Yep, Iâll be keeping folks updated as things land in the nightly images in the run-up to BETA. Once at BETA I will expect full docs to make an appearance as well.
Thatâs not always trivial. Backing up a Nextcloud container for example, correctly, involves setting maintenance mode, running a mysqldump or pgdump, etc. You wouldnât get a good backup just doing a server level backup of some sort. Itâs not the only app with special backup procedures either. And with going to docker, it can get even worse as someone may run a separate postgres database âserverâ container for many purposes, making it even more difficult. I suppose they can make a best effort but it wonât be a substitute for me for a container based backup of the special apps.
I could see that being an issue for live backups. If the app is properly shut down before back up and as long as separate containers are accounted for that shouldnât be an issue.
My concern depending on how the apps are containerized if they (multiple independent apps) share infrastructure/backends like databases. Thatâs more efficient but Iâm not seeing an easy technical route for backup and restore.
Yeah it is complex. However nextcloud is a great example that frequently breaks highlighting my concern.
Imagine nextcloud breaks in a way thatâs not easily recoverable. It would be awful to have to roll back all applications (configuration and data) to an earlier state when itâs only one that needs to be restored. To me that puts a lot of data at risk. For example X application commits data which will be lost. That data might be important and unknown at the time of restore by the admin. This risk grows with the number of applications on the server.
snapshotting data + config for each âappâ, ie a compose folder + data dataset
taking care backup/restore on a app compose basis, ie where necessary, there might need to be a backup/restore service implemented in the compose stack.
Not sure if 2) would be undertaken. Its something I do organize for some of my compose apps.
I definitely organise 1) to happen, and in many cases this is sufficientâŚ
Exactly what is needed for some apps. My nextcloud backup is taken within my container, it does the documented nextcloud backup steps and I never lose anything. Same for mariadb container and a few more.
For custom installed compose apps, we expect to store the original YAML (in the case where a user supplied their own) on the data pool, as well as the host mounts and other persistent data. This can be used to migrate / deploy an existing app to a new system, assuming you move the persistent App data over via ZFS Replication or some other means.
For Apps installed via the UI, those are a bit different since we have a lot of extra meta-data to consider from the UI questions. Those will be stored in the TrueNAS configuration database and have an option to export / import those config files. (JSON or YAML not yet sure). With the configuration in the DB, it means losing the boot pool you can bring your apps configuration back if you restore your config file, and manually export them if needed in the case of migrating to a new system.
âAlways keep a recent copy of the configuration fileâ is a fair âBest Practiceâ requirement.
But, for the sake of the many, many casual users who will not hear of best practices until after disaster has occurred, it would be good if apps could be restored from their own pool alone, even if the boot pool is lost.
Yea, thats on my list of things to do. Backup configuration to pool periodically. On fresh install when pool is imported, prompt user if they want to restore the last saved configuration.
Thatâs been in the product for roughly ten yearsâevery day at 0345, a backup is taken to /var/db/system/configs-(longhexnumber)/(TrueNAS release)/, which is in the .system dataset.
Thatâs the piece thatâs missing despite open tickets and discussion on the old forum. In fact, it seems that when the pool is imported, those old configs are erased.
This is where Iâm a little confused. When I hear persistent app data and app configuration pools that holds config files it seems monolithic.
Monolithic being defined as restoring and backing up all applications via their respective persistent data/configuration pools. Therefore you can only back up by replication or snapshot those entire pools.
If that is true the end user canât restore an individual app without it affecting the rest of the applications?
This is a serious concern for me to begin to invest in truenas scale apps. A few posts above I talked about a scenario involving nextcloud describing my concerns with such a monolithic approach to back up and restore. This approach can lead to data loss that scales with the number of apps and users during restore.
If weâre able to manually export and import a specific apps configuration and data set why not make that the basis for backup and restore.
@kris Iâm coming at this from an end user perspective but could you help clarify my concerns?
Edit: If entire pools can be backed up but restoring can happen per appâs configuration/persistent data my primary concern would be adequately addressed. Iâm not sure thatâs being proposed in the future backup restore system.
I am also looking for something like this. Coming from a full truecharts implementation where snapshots and database dumps could be scheduled with heavy script. I feel like Iâm living on the edge now.
I will explore a bit more, but so far I am not seeing an equivalent for ix apps.