Last active 1749156079

Code snippet to create linked storage directories for Zammad. As shown in https://youtu.be/EorlfrN6n60

MrGeneration's Avatar MrGeneration revised this gist 1749156079. Go to revision

1 file changed, 4 insertions, 4 deletions

2-zammad-move-storage-files-to-linked-folder-existing-files.sh

@@ -1,5 +1,5 @@
1 1 # Below works with existing data storage. STOP Zammad during below operation
2 - mv /opt/zammad_storage/ /new_path/
3 - ln -s /new_path/ /opt/zammad/storage
4 - chown zammad:zammad /new_path/
5 - chmod 700 /new_path/
2 + mv /opt/zammad_storage/ /opt/zammad_storage/
3 + ln -s /opt/zammad_storage/ /opt/zammad/storage
4 + chown zammad:zammad /opt/zammad_storage/
5 + chmod 700 /opt/zammad_storage/

MrGeneration's Avatar MrGeneration revised this gist 1749156060. Go to revision

1 file changed, 3 insertions, 9 deletions

2-zammad-move-storage-files-to-linked-folder-existing-files.sh

@@ -1,11 +1,5 @@
1 1 # Below works with existing data storage. STOP Zammad during below operation
2 2 mv /opt/zammad_storage/ /new_path/
3 - mkdir /opt/zammad_storage/
4 - ln -s /opt/zammad_storage/ /opt/zammad/storage
5 - chown zammad:zammad /opt/zammad_storage/
6 - chmod 700 /opt/zammad_storage/
7 -
8 - # Change to File storage and move said files from DB to File
9 - # omit 'zammad run' on non package installations
10 - zammad run rails r "Setting.set('storage_provider', 'File')"
11 - zammad run rails r "Store::File.move('DB', 'File')""
3 + ln -s /new_path/ /opt/zammad/storage
4 + chown zammad:zammad /new_path/
5 + chmod 700 /new_path/

MrGeneration's Avatar MrGeneration revised this gist 1749155996. Go to revision

2 files changed, 0 insertions, 0 deletions

zammad-move-storage-files-to-linked-folder.sh renamed to 1-zammad-move-storage-files-to-linked-folder.sh

File renamed without changes

zammad-move-storage-files-to-linked-folder-existing-files.sh renamed to 2-zammad-move-storage-files-to-linked-folder-existing-files.sh

File renamed without changes

MrGeneration's Avatar MrGeneration revised this gist 1749155427. Go to revision

1 file changed, 11 insertions

zammad-move-storage-files-to-linked-folder-existing-files.sh(file created)

@@ -0,0 +1,11 @@
1 + # Below works with existing data storage. STOP Zammad during below operation
2 + mv /opt/zammad_storage/ /new_path/
3 + mkdir /opt/zammad_storage/
4 + ln -s /opt/zammad_storage/ /opt/zammad/storage
5 + chown zammad:zammad /opt/zammad_storage/
6 + chmod 700 /opt/zammad_storage/
7 +
8 + # Change to File storage and move said files from DB to File
9 + # omit 'zammad run' on non package installations
10 + zammad run rails r "Setting.set('storage_provider', 'File')"
11 + zammad run rails r "Store::File.move('DB', 'File')""

MrGeneration's Avatar MrGeneration revised this gist 1749155101. Go to revision

No changes

MrGeneration's Avatar MrGeneration revised this gist 1748266239. Go to revision

1 file changed, 11 insertions

zammad-move-storage-files-to-linked-folder.sh(file created)

@@ -0,0 +1,11 @@
1 + # Below only works if you have no /opt/zammad/storage folder yet and
2 + # still use the default "DB" setting for the storage_provider
3 + mkdir /opt/zammad_storage/
4 + ln -s /opt/zammad_storage/ /opt/zammad/storage
5 + chown zammad:zammad /opt/zammad_storage/
6 + chmod 700 /opt/zammad_storage/
7 +
8 + # Change to File storage and move said files from DB to File
9 + # omit 'zammad run' on non package installations
10 + zammad run rails r "Setting.set('storage_provider', 'File')"
11 + zammad run rails r "Store::File.move('DB', 'File')""
Newer Older