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

Preserve image-attachments directory on upgrade #1341

Closed
LBegnaud opened this issue Jul 12, 2017 · 5 comments
Closed

Preserve image-attachments directory on upgrade #1341

LBegnaud opened this issue Jul 12, 2017 · 5 comments
Labels
type: feature Introduction of new functionality to the application

Comments

@LBegnaud
Copy link

Feature Request:

I couldn't find it anywhere obvious, but during the upgrade process it is necessary to move the image-attachments directory contents to the new path. Also (at least for my installation) i have to chown to the netbox user on that folder.

I'm curious if we could get the process bundled into the upgrade.sh (maybe just move the contents from the old netbox symlink?). I'd be happy with a config option to point the image-attachments directory somewhere else on the filesystem if not.

@jeremystretch
Copy link
Member

This might get murky when dealing with symlinks (e.g. media/ -> /opt/somewhere/else/). Not really sure how best to approach this. Any ideas?

@LBegnaud
Copy link
Author

I agree symlinks underneath the the /opt/netbox symlink would get hairy, but that seems like the simplest option

Looks like media/ is served by django directly, could we not just have a config option to point that elsewhere?

@jeremystretch
Copy link
Member

Yeah, I think exposing it as a config option makes sense.

@Zorlin
Copy link

Zorlin commented Jul 19, 2017

+1 for making it a config option. That seems the least insane way to handle this ;)

@lae
Copy link
Contributor

lae commented Aug 28, 2017

There's a config option for this already, MEDIA_ROOT - for handling upgrades I'm actually modifying settings.py but preferably this would be configured within configuration.py.

@jeremystretch jeremystretch added this to the v2.2 milestone Aug 29, 2017
@jeremystretch jeremystretch added type: feature Introduction of new functionality to the application and removed help wanted labels Oct 11, 2017
@jeremystretch jeremystretch removed this from the v2.2 milestone Oct 11, 2017
lampwins pushed a commit to lampwins/netbox that referenced this issue Oct 13, 2017
…g to specify where uploaded files are stored on disk
@lock lock bot locked as resolved and limited conversation to collaborators Jan 18, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: feature Introduction of new functionality to the application
Projects
None yet
Development

No branches or pull requests

4 participants