Skip to content

Commit ca2903b

Browse files
authored
Change backup directory to /opt for paperless-ngx (#9195)
* Change backup directory to /opt for paperless-ngx Using /tmp for the backup is risky since many installations host it with tmpfs and thereby in RAM. Having a bigger document base will deplete the memory on backup. * Update paperless-ngx.sh Added missing change.
1 parent 1405e28 commit ca2903b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

ct/paperless-ngx.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ function update_script() {
3535
if grep -q "uv run" /etc/systemd/system/paperless-webserver.service; then
3636

3737
msg_info "Backing up user data and configuration"
38-
local BACKUP_DIR="/tmp/paperless_backup_$$"
38+
local BACKUP_DIR="/opt/paperless_backup_$$"
3939
mkdir -p "$BACKUP_DIR"
4040
for dir in /opt/paperless/*/; do
4141
dir_name=$(basename "$dir")
@@ -84,7 +84,7 @@ function update_script() {
8484
find /opt/paperless -name "__pycache__" -type d -exec rm -rf {} +
8585

8686
msg_info "Backing up user data and configuration"
87-
local BACKUP_DIR="/tmp/paperless_backup_$$"
87+
local BACKUP_DIR="/opt/paperless_backup_$$"
8888
mkdir -p "$BACKUP_DIR"
8989

9090
for dir in /opt/paperless/*/; do
@@ -122,7 +122,7 @@ function update_script() {
122122

123123
$STD systemctl daemon-reload
124124
msg_info "Backing up user data and configuration"
125-
BACKUP_DIR="/tmp/paperless_backup_$$"
125+
BACKUP_DIR="/opt/paperless_backup_$$"
126126
mkdir -p "$BACKUP_DIR"
127127

128128
for dir in /opt/paperless/*/; do

0 commit comments

Comments
 (0)