[GH-ISSUE #1866] 💬 [Question] Manual backup & update #727

Open
opened 2026-02-25 21:35:46 +03:00 by kerem · 3 comments
Owner

Originally created by @jac-ron on GitHub (Feb 16, 2026).
Original GitHub issue: https://github.com/cypht-org/cypht/issues/1866

Hello, I tried to find official information here, but unfortunately couldn't. I installed cypht 2.6.0 manually. What should I back up now so that I can restore it on another server, for example?
I guess the database, config/, and .env if you use the database, and otherwise USER_SETTINGS_DIR instead of the database. What about ATTACHMENT_DIR? And have I forgotten anything?

What is the recommended update process? I guess you delete everything and then add the things I mentioned above again?

Thank you very much for the clarifications!

Originally created by @jac-ron on GitHub (Feb 16, 2026). Original GitHub issue: https://github.com/cypht-org/cypht/issues/1866 Hello, I tried to find official information here, but unfortunately couldn't. I installed cypht 2.6.0 manually. What should I back up now so that I can restore it on another server, for example? I guess the database, `config/`, and `.env` if you use the database, and otherwise `USER_SETTINGS_DIR` instead of the database. What about `ATTACHMENT_DIR`? And have I forgotten anything? What is the recommended update process? I guess you delete everything and then add the things I mentioned above again? Thank you very much for the clarifications!
Author
Owner

@IrAlfred commented on GitHub (Feb 17, 2026):

Hello @jac-ron ! Thank you for reaching out about backup and update procedures for Cypht. You're absolutely right that we need better official documentation on this topic. Let me clarify the backup and update process:

What to Back Up

Your list is mostly correct! Here's the complete checklist:

Database (if using USER_CONFIG_TYPE=DB)

  • Tables: hm_user, hm_user_session, hm_user_settings

.env file

  • Contains all your environment-specific settings

USER_SETTINGS_DIR (if using USER_CONFIG_TYPE=file)

  • Default: /var/lib/hm3/users
  • Contains user settings stored as files instead of in the database

ATTACHMENT_DIR

  • Default: /var/lib/hm3/attachments
  • It contains all uploaded email attachments (Not critical if your emails still exist on the server)

The update process is NOT delete everything and restore. Here's the safer approach:

  1. Backup first (everything mentioned above)
  2. Extract the new version to a temporary location
  3. Copy your backed-up files back:
    • .env
    • Restore database dump (if using DB storage)
    • Point to your existing USER_SETTINGS_DIR and ATTACHMENT_DIR
  4. Run database migrations if needed (check /database/migrations/ for any new migrations)
  5. Test the installation

Key point: Since Cypht stores user data separately from the application code (in USER_SETTINGS_DIR, ATTACHMENT_DIR, and the database), you should never need to delete those. Only replace the application files themselves.

Don't hesitate to reach out if you run into any issues during the process!

<!-- gh-comment-id:3914490596 --> @IrAlfred commented on GitHub (Feb 17, 2026): Hello @jac-ron ! Thank you for reaching out about backup and update procedures for Cypht. You're absolutely right that we need better official documentation on this topic. Let me clarify the backup and update process: ## What to Back Up Your list is mostly correct! Here's the complete checklist: ✅ **Database** (if using `USER_CONFIG_TYPE=DB`) - Tables: `hm_user`, `hm_user_session`, `hm_user_settings` ✅ **.env** file - Contains all your environment-specific settings ✅ **USER_SETTINGS_DIR** (if using `USER_CONFIG_TYPE=file`) - Default: `/var/lib/hm3/users` - Contains user settings stored as files instead of in the database ✅ **ATTACHMENT_DIR** - Default: `/var/lib/hm3/attachments` - It contains all uploaded email attachments (Not critical if your emails still exist on the server) ## Recommended Update Process The update process is **NOT** delete everything and restore. Here's the safer approach: 1. **Backup first** (everything mentioned above) 2. **Extract the new version** to a temporary location 3. **Copy your backed-up files back**: - `.env` - Restore database dump (if using DB storage) - Point to your existing `USER_SETTINGS_DIR` and `ATTACHMENT_DIR` 4. **Run database migrations** if needed (check `/database/migrations/` for any new migrations) 5. **Test the installation** **Key point**: Since Cypht stores user data separately from the application code (in `USER_SETTINGS_DIR`, `ATTACHMENT_DIR`, and the database), you should never need to delete those. Only replace the application files themselves. Don't hesitate to reach out if you run into any issues during the process!
Author
Owner

@marclaporte commented on GitHub (Feb 17, 2026):

@IrAlfred Maybe there shoukd be a page about this. On the upcoming cypht.org site or a wiki page on GitHub?

<!-- gh-comment-id:3914866498 --> @marclaporte commented on GitHub (Feb 17, 2026): @IrAlfred Maybe there shoukd be a page about this. On the upcoming cypht.org site or a wiki page on GitHub?
Author
Owner

@IrAlfred commented on GitHub (Feb 17, 2026):

@IrAlfred Maybe there shoukd be a page about this. On the upcoming cypht.org site or a wiki page on GitHub?

Yes, definitely !

<!-- gh-comment-id:3914887197 --> @IrAlfred commented on GitHub (Feb 17, 2026): > [@IrAlfred](https://github.com/IrAlfred) Maybe there shoukd be a page about this. On the upcoming cypht.org site or a wiki page on GitHub? Yes, definitely !
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/cypht#727
No description provided.