| 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')"" |
| 12 |
MrGeneration / Move Store from DB to File (linked directory)
Last active 3 months ago
Code snippet to create linked storage directories for Zammad. As shown in https://youtu.be/EorlfrN6n60
Revision 9e4644a1e49564c9e1b000cbd7d0c29110f8aa45
| 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')"" |
| 12 |