You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
55
55
56
56
!!! note
57
-
These operations are not necessary if your installation is utilizing a [remote storage backend](../configuration/system.md#storage_backend).
57
+
These operations are not necessary if your installation is utilizing a [remote storage backend](../configuration/system.md#storages).
Copy file name to clipboardExpand all lines: docs/configuration/system.md
+32-9Lines changed: 32 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -196,23 +196,46 @@ The dotted path to the desired search backend class. `CachedValueSearchBackend`
196
196
197
197
---
198
198
199
-
## STORAGE_BACKEND
199
+
## STORAGES
200
200
201
-
Default: None (local storage)
201
+
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.
202
202
203
-
The backend storage engine for handling uploaded files (e.g. image attachments). NetBox supports 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.
203
+
By default, the following configuration is used:
204
204
205
-
The configuration parameters for the specified storage backend are defined under the `STORAGE_CONFIG` setting.
A dictionary of configuration parameters for the storage backend configured as `STORAGE_BACKEND`. The specific parameters to be used here are specific to each backend; see the documentation for your selected backend ([`django-storages`](https://django-storages.readthedocs.io/en/stable/) or [`django-storage-swift`](https://github.com/dennisv/django-storage-swift)) for more detail.
235
+
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).
214
236
215
-
If `STORAGE_BACKEND` is not defined, this setting will be ignored.
237
+
!!! note
238
+
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.
Copy file name to clipboardExpand all lines: docs/customization/custom-scripts.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -140,6 +140,8 @@ The Script class provides two convenience methods for reading data from files:
140
140
141
141
These two methods will load data in YAML or JSON format, respectively, from files within the local path (i.e. `SCRIPTS_ROOT`).
142
142
143
+
**Note:** These convenience methods are deprecated and will be removed in NetBox v4.4. These only work if running scripts within the local path, they will not work if using a storage other than ScriptFileSystemStorage.
144
+
143
145
## Logging
144
146
145
147
The Script object provides a set of convenient functions for recording messages at different severity levels:
Copy file name to clipboardExpand all lines: docs/installation/3-netbox.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -207,7 +207,7 @@ All Python packages required by NetBox are listed in `requirements.txt` and will
207
207
208
208
### Remote File Storage
209
209
210
-
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`.
210
+
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`.
211
211
212
212
```no-highlight
213
213
sudo sh -c "echo 'django-storages' >> /opt/netbox/local_requirements.txt"
0 commit comments