Volumes and Backup
-
Hey there,
Just a small question.
I've read the documents that say that Volumes won't be backed up.
I seem to recall in the past someone saying that they would though - if they are formatted as ext4. Has this changed, or did I just mis-remember?
Also, if they aren't backed up now, are there any plans to enable this in the future, or not so much? Sorry just want to plan ahead to see if I need to get my storage space on the main disk rather than on a separate volume.
Hope you are having a great day!
-
@michaelpope I will take a Hetzner Storage Box as an example and Gitlab with the Docker Registry App.
https://docs.cloudron.io/apps/docker-registry/
If you have a 5TB Hetzner Storage Box and use this Storage box as the backup solution, all app and system backups will be located in this Storage Box.
Now if I create a Volume from the same Storage Box with a sub-folder / sub-account to use for the Docker Registry the data will be on the Storage Box.
These files shared in this volume between gitlab and the docker registry will not be backed up in a app backup or system backup.
-
@BrutalBirdie Ah, perhaps I should clarify, I wasn't clear here.
I'm not using the Volume as a backup destination. I'm using it as extra space for an app, like say... NextCloud. You know, App Settings -> Storage -> Mounts.
It's a lot easier to find VPSs with cheap block storage than it is to find VPSs with cheap local storage, so it makes sense to stick the 'big data' apps on a block storage mount. I seem to recall people saying it would back it up, but the Volumes section in the docs says pretty clearly that it will not.
Just want to be sure :).
-
@michaelpope if you use a volume for apps the data in the volume will not be backed up.
One of my solutions is this: (Not official supported and a bit hacky)
I use Hetzner a lot.
If I now run a Cloudron in the Hetzner Cloud I can create a Volume for this Server.
Example: I know I only need a small node CPX31 - 4 vCPU - 8GB RAM and 160 GB Disk Space.
Now I can add a Volume which I can size up to 10 TB (a bit more pricey then normal storage but I can resize this volume on the go)Now I setup a fresh Cloudron and well... move the whole
/home/yellowtent/
to the mounted volume and make a symlink for/home/yellowtent
pointing to the volume. (Or just the/home/yellowtent/appsdata
directory).Now I have a Cloudron Server with a flexible upscalable drive
Then I can use Storage Boxes for Backups and all will be included.So far I did not have issues with this.
Basically I am replacing the
/home/yellowtent
with a scalable drive, this way I can start with very small servers for customers and scale them up on the go.
A bit more pricey but flexible and I don't need to worry about the volume stuff. -
@BrutalBirdie Oh... that's interesting... I'll have to consider this solution.
Thanks you for it
-
@BrutalBirdie One question I thought of, if you don't mind. If you use this setup, and your Cloudron box dies, is a full restore pretty easy with this setup, or kinda difficult?
-
@michaelpope I think I had to do this once with an instance.
It should be fairly simple.
On a full failure on a new server.
When you start the Cloudron setup you get to the point to do the setup or restore fully.At this point I would shutdown the
box.service
and do the swap to the volume with the symlink.
Then start thebox.service
up again and do the restore.If I find the time tomorrow I could do a test drive of this exact scenario.
-
@BrutalBirdie Cool. I'll keep this in mind and perhaps give this a try as well :).
Thanks for everything.
-
@michaelpope So, just to clarify, there are two types of storage on Cloudron. One which we call "App data directory". This data is "local" to the app. This is always backed up. You can change this to any location on the server - https://docs.cloudron.io/apps/#data-directory .
The other storage mechanism is volumes. This lets you share across apps. This is not backed up - https://docs.cloudron.io/volumes/#usage . This is a limitation we want to fix someday.
We actually have a task to first unify the concept of App data directory and volume which we will do soonish - https://git.cloudron.io/cloudron/box/-/issues/785
Sorry, if that got too technical!
-
@girish This makes a ton of sense, although I'm not quite sure if I'm doing it right. Under what you linked to, the section should be under the Resources tab, although I think it's moved to the Storage tab (no problems with that, I just wanted to make sure I'm handling it correctly).
The part that's a little confusing is how 'App Data' and Volumes tie together in storage (now it seems this may be resolved as you said, since your working on Volume updating at some point in the future).
Anyways, App Data says to mount an external EXT4 disk, which I assume is done with the 'Mounts' interface right below it. However, the mount says that you are mounting 'Volumes'.
The documentation says 'App Data' is backed up. However, the documentation also says that 'Volumes' are not backed up. So that does leave me a little perplexed as to whether the data will be backed up or not. I think according to your comment, that it will be backed up (because you did say it would no matter where it is on the server). But I just thought I'd check
In any case, thanks for your help, and hope you have an awesome rest of your week.
-
-