Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can I mount an existing local folder as a volume? #295

Open
stancubed opened this issue Aug 30, 2024 · 8 comments
Open

How can I mount an existing local folder as a volume? #295

stancubed opened this issue Aug 30, 2024 · 8 comments
Labels
question Further information is requested

Comments

@stancubed
Copy link

Question:

I'm trying to add a local directory so that I can work with it inside a workspace and have those changes reflected in the directory as well. At the moment, it looks like Voltaserve is built to serve fresh bucket content, but how can I get existing data into it? Are there any ways to do this currently or any plans to add this capability?


Context:

I've got this deployed via Portainer on Docker in Linux and everything is working very well so far!


What have you tried:

I've tried adding my local dir to minio as a volume, but that doesn't seem to change anything on the service.

minio:
    image: minio/minio:RELEASE.2024-04-06T05-26-02Z
    container_name: volta_minio
    networks:
      - voltaserve_default
    ports:
      - ${VOLTASERVE_MINIO_PORT}:9000
      - ${VOLTASERVE_MINIO_CONSOLE_PORT}:9001
    environment:
      MINIO_ROOT_USER: voltaserve
      MINIO_ROOT_PASSWORD: voltaserve
      MINIO_REGION: us-east-1
    volumes:
      - /home/user/storage/digital/ebooks:/data
    command: server /data --console-address ":9001"
@stancubed stancubed added the question Further information is requested label Aug 30, 2024
@bouassaba
Copy link
Member

@stancubed what about using WebDAV to import your existing data into Voltaserve?
You can use Cyberduck, WinSCP or Rclone.

@stancubed
Copy link
Author

I need the data to remain in its current structure because it's also used by other containers, so I was hoping I could keep the existing storage infra but mount it into Voltaserve to interact with it as well. If I import it into Voltaserve, it'll disappear into Minio and won't be accessible by the host machine or other containers that have them mounted as volumes, right?

@bouassaba
Copy link
Member

Right, the data used by Voltaserve will be living in MinIO.
A workaround would be to run a periodic sync from time to time with WebDAV, between your source folder and Voltaserve. Would that work for you?

@stancubed
Copy link
Author

stancubed commented Sep 7, 2024 via email

@snapshotleisure
Copy link

Hi @bouassaba, is it possible to import an existing Minio bucket in? or it has to be fresh? Also if there were any changes that were done to the file outside Voltaserve, would those changes be picked up?

@bouassaba
Copy link
Member

Hi @bouassaba, is it possible to import an existing Minio bucket in? or it has to be fresh? Also if there were any changes that were done to the file outside Voltaserve, would those changes be picked up?

@snapshotleisure it has to be a fresh bucket.
But as long as you follow the folder structure of Voltaserve inside MinIO - external changes will be picked up.
Create a fresh bucket, and import some files using Voltaserve, then have a look at the structure to get familiar with it.
I will be happy to answer any questions regarding this.

@bouassaba
Copy link
Member

bouassaba commented Oct 11, 2024

@snapshotleisure btw the IDs you see in the folder names inside MinIO's bucket are snapshot IDs, same as in the database table snapshot and snapshot_file (this one is the association between snapshots and files).
A file can have multiple snapshots.

@snapshotleisure
Copy link

Ok, thank you for that

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants