mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-27 10:58:37 -06:00
18423 review changes
This commit is contained in:
parent
4552cea39e
commit
2517c27ab4
@ -54,7 +54,7 @@ pg_dump --username netbox --password --host localhost -s netbox > netbox_schema.
|
|||||||
By default, NetBox stores uploaded files (such as image attachments) in its media directory. To fully replicate an instance of NetBox, you'll need to copy both the database and the media files.
|
By default, NetBox stores uploaded files (such as image attachments) in its media directory. To fully replicate an instance of NetBox, you'll need to copy both the database and the media files.
|
||||||
|
|
||||||
!!! note
|
!!! note
|
||||||
These operations are not necessary if your installation is utilizing a [remote storage backend](../configuration/system.md#storage_backend).
|
These operations are not necessary if your installation is utilizing a [remote storage backend](../configuration/system.md#storages).
|
||||||
|
|
||||||
### Archive the Media Directory
|
### Archive the Media Directory
|
||||||
|
|
||||||
|
@ -198,11 +198,9 @@ The dotted path to the desired search backend class. `CachedValueSearchBackend`
|
|||||||
|
|
||||||
## STORAGES
|
## STORAGES
|
||||||
|
|
||||||
Default: See below (local storage)
|
The backend storage engine for handling uploaded files such as [image attachments](../models/extras/imageattachment.md) and [custom scripts](../customization/custom-scripts.md). NetBox integrates with the [`django-storages`](https://django-storages.readthedocs.io/en/stable/) and [`django-storage-swift`](https://github.com/dennisv/django-storage-swift) libraries, which provide backends for several popular file storage services. If not configured, local filesystem storage will be used.
|
||||||
|
|
||||||
The backend storage engine for handling uploaded files (e.g. image attachments) and scripts. NetBox integration with the [`django-storages`](https://django-storages.readthedocs.io/en/stable/) and [`django-storage-swift`](https://github.com/dennisv/django-storage-swift) packages, which provide backends for several popular file storage services. If not configured, local filesystem storage will be used.
|
By default, the following configuration is used:
|
||||||
|
|
||||||
By default the following configuration is used:
|
|
||||||
|
|
||||||
```python
|
```python
|
||||||
STORAGES = {
|
STORAGES = {
|
||||||
@ -218,9 +216,9 @@ STORAGES = {
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
Within the STORAGES dict, "default" is used for image uploads and "scripts" is used for Scripts.
|
Within the `STORAGES` dictionary, `"default"` is used for image uploads, "staticfiles" is for static files and `"scripts"` is used for custom scripts.
|
||||||
|
|
||||||
If using a remote storage like S3, define the config as STORAGES[key]["OPTIONS"] for each storage item as needed. For example:
|
If using a remote storage like S3, define the config as `STORAGES[key]["OPTIONS"]` for each storage item as needed. For example:
|
||||||
|
|
||||||
```python
|
```python
|
||||||
STORAGES = {
|
STORAGES = {
|
||||||
@ -234,10 +232,10 @@ STORAGES = {
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
The specific configuration settings for each storage can be found in the [django-storages documentation](https://django-storages.readthedocs.io/en/latest/index.html).
|
The specific configuration settings for each storage backend can be found in the [django-storages documentation](https://django-storages.readthedocs.io/en/latest/index.html).
|
||||||
|
|
||||||
!!! note
|
!!! note
|
||||||
The default STORAGES is used as a base and any values defined in configuration.py STORAGES is overlaid, so you only need to define the specific sections you are overriding.
|
Any keys defined in the `STORAGES` configuration parameter replace those in the default configuration. It is only necessary to define keys within the `STORAGES` for the specific backend(s) you wish to configure.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
@ -207,7 +207,7 @@ All Python packages required by NetBox are listed in `requirements.txt` and will
|
|||||||
|
|
||||||
### Remote File Storage
|
### Remote File Storage
|
||||||
|
|
||||||
By default, NetBox will use the local filesystem to store uploaded files. To use a remote filesystem, install the [`django-storages`](https://django-storages.readthedocs.io/en/stable/) library and configure your [desired storage backend](../configuration/system.md#storage_backend) in `configuration.py`.
|
By default, NetBox will use the local filesystem to store uploaded files. To use a remote filesystem, install the [`django-storages`](https://django-storages.readthedocs.io/en/stable/) library and configure your [desired storage backend](../configuration/system.md#storages) in `configuration.py`.
|
||||||
|
|
||||||
```no-highlight
|
```no-highlight
|
||||||
sudo sh -c "echo 'django-storages' >> /opt/netbox/local_requirements.txt"
|
sudo sh -c "echo 'django-storages' >> /opt/netbox/local_requirements.txt"
|
||||||
|
Loading…
Reference in New Issue
Block a user