Files
upstream-mirror e7da97194a
Some checks failed
App Prod-Parity E2E Dispatch / dispatch (push) Failing after 10s
CD Storybook UI / build (push) Failing after 3m25s
CD Storybook UI / dispatch (push) Has been skipped
CD deploy main / website-changed-files (push) Successful in 18m8s
CI Agent Skills / changed-files-check (push) Successful in 18m9s
CI Create App E2E minimal / changed-files-check (push) Successful in 24s
CI Create App / changed-files-check (push) Successful in 26s
CI Docs / changed-files-check (push) Successful in 26s
CI Emails / changed-files-check (push) Successful in 28s
CI Example App Hello World / changed-files-check (push) Successful in 23s
CI Front / changed-files-check (push) Has been skipped
CI Example App Postcard / changed-files-check (push) Successful in 27s
CI UI / changed-files-check (push) Has been skipped
CI Utils Test / changed-files-check (push) Successful in 45s
CI Twenty Apps / discover (push) Successful in 1m3s
CD deploy main / deploy-main (push) Failing after 3s
CI Agent Skills / agent-skills-validate (push) Has been skipped
CI Create App / create-app-test (lint) (push) Has been skipped
CI Emails / emails-test (push) Has been skipped
CI Front / front-task (lingui:compile) (push) Has been skipped
CI Front / front-task (lint) (push) Has been skipped
CI Example App Postcard / example-app-postcard (push) Has been skipped
CI UI / ui-task (lint) (push) Has been skipped
CI UI / ui-task (pack-size) (push) Has been skipped
CI UI / ui-task (size) (push) Has been skipped
CI UI / ui-task (test) (push) Has been skipped
CI UI / ui-task (typecheck) (push) Has been skipped
CI Utils Test / utils-test (push) Has been skipped
CI Twenty Apps / ${{ matrix.app.name }} (push) Has been skipped
CI Emails / ci-emails-status-check (push) Successful in 2s
CI Example App Hello World / ci-example-app-hello-world-status-check (push) Successful in 2s
CI Example App Postcard / ci-example-app-postcard-status-check (push) Successful in 3s
CI UI / ui-sb-test (push) Has been skipped
CI Utils Test / ci-utils-test-status-check (push) Successful in 2s
CI Twenty Apps / ci-twenty-apps-status-check (push) Successful in 2s
CI UI / ci-ui-status-check (push) Successful in 2s
CI Desktop / desktop (push) Failing after 1m8s
Push docs to Crowdin / Push documentation to Crowdin (push) Failing after 55s
Push translations to Crowdin / Extract and upload translations (push) Failing after 5s
Push website translations to Crowdin / Extract and upload website translations (push) Failing after 5s
CI Create App / create-app-test (test) (push) Has been skipped
CI Create App / create-app-test (typecheck) (push) Has been skipped
CI Docs / docs-lint (push) Has been skipped
CI Example App Hello World / example-app-hello-world (push) Has been skipped
CI Front / front-task (lingui:extract) (push) Has been skipped
CI Front / front-task (test) (push) Has been skipped
CI Front / front-task (typecheck) (push) Has been skipped
CI UI / ui-sb-build (push) Failing after 1m32s
CI Twenty Apps / ${{ matrix.app.name }} (${{ matrix.server-source }}) (push) Has been skipped
CI Agent Skills / agent-skills-publish (push) Has been skipped
CI Create App / ci-create-app-status-check (push) Successful in 2s
CI Agent Skills / agent-skills-remote-source (push) Has been skipped
CI Create App E2E minimal / create-app-e2e-minimal (push) Has been cancelled
CI E2E Main / e2e-test (push) Has been cancelled
CI Front / front-sb-build (push) Has been cancelled
CI Front / front-build (push) Has been cancelled
CI Create App E2E minimal / ci-create-app-e2e-minimal-status-check (push) Has been cancelled
CI E2E Main / ci-e2e-main-status-check (push) Has been cancelled
CI E2E Main / notify-main-ci-failure (push) Has been cancelled
CI E2E Main / qa-scout-comment (push) Has been cancelled
CI Front / front-sb-test (push) Has been cancelled
CI Front / front-sb-screenshots (push) Has been cancelled
CI Front / ci-front-status-check (push) Has been cancelled
DPA Sub-Processor Sync / sync-subprocessors (push) Failing after 3s
AI Catalog Sync / sync-catalog (push) Failing after 2s
snapshot of https://github.com/twentyhq/twenty.git (main, 2026-09-17; blobs > 131072B omitted)
2026-09-17 23:28:13 +05:00

107 lines
6.0 KiB
Plaintext

---
title: دليل الترقية
icon: arrow-up-right-dots
---
## إرشادات عامة
**احرص دائمًا على إنشاء نسخة احتياطية لقاعدة البيانات قبل بدء عملية الترقية** عن طريق تشغيل:
```bash
docker exec -it {db_container_name_or_id} pg_dumpall -U {postgres_user} > databases_backup.sql
```
لاستعادة النسخة الاحتياطية:
```bash
cat databases_backup.sql | docker exec -i {db_container_name_or_id} psql -U {postgres_user}
```
إذا كنت تستخدم Docker Compose، اتبع الخطوات التالية:
1. أوقف Twenty: `docker compose down`
2. غيّر قيمة `TAG` في ملف `.env` الموجود بجانب ملف `docker-compose.yml`
3. ابدأ تشغيل Twenty: `docker compose up -d`
يقوم الخادم بتشغيل جميع عمليات ترحيل الترقية المطلوبة تلقائيًا عند بدء التشغيل. لا حاجة إلى أي أمر يدوي.
## الترقية إلى v2.34+ — الحد الأدنى PostgreSQL 15
يتطلب Twenty v2.34 الإصدار PostgreSQL 15 أو أحدث. يستخدم إعداد Docker Compose الرسمي الإصدار PostgreSQL 16. إذا كان مثيلك يتصل بقاعدة بيانات مُدارة خارجيًا، فقم بترقيتها قبل بدء خادم v2.34.
## الترقيات عبر الإصدارات (v1.23+)
بدءًا من **v1.23**، يدعم Twenty الترقيات عبر الإصدارات. يمكنك الانتقال مباشرةً من أي إصدار مدعوم إلى أحدث إصدار دون المرور بكل إصدار وسيط.
على سبيل المثال، الترقية من v1.23 مباشرةً إلى v2.0 مدعومة بالكامل.
## الترقية إلى v2.5+ — غلاف التشفير للبيانات الساكنة (at-rest)
بدءًا من **v2.5**، يقوم Twenty بتخزين الأسرار أثناء السكون (at-rest) — مثل رموز OAuth، ومتغيرات التطبيق، ومفاتيح التوقيع الخاصة، وقيم الإعدادات الحساسة، وأسرار TOTP — داخل غلاف ذي إصدار `enc:v2:` ومشفّر باستخدام `ENCRYPTION_KEY` (أو `APP_SECRET` إذا لم يتم تعيين `ENCRYPTION_KEY`).
أول إقلاع على v2.5 يشغّل أوامر ترقية بطيئة تقوم بإجراء **ملء رجعي** للصفوف الموجودة داخل الغلاف الجديد. هذه الأوامر عديمة الأثر عند التكرار (idempotent) — إيقاف الخادم وإعادة تشغيله يستأنف من حيث توقّف — لكنها قد تستغرق بعض الوقت على قواعد البيانات الكبيرة. يمكنك متابعة التقدّم باستخدام `upgrade:status`.
يجب تعيين `ENCRYPTION_KEY` مخصص **قبل** الترقية إلى v2.5 لكي يكتب الملء الرجعي الصفوف باستخدامه منذ البداية. يتطلّب تبديل المفاتيح بعد الملء الرجعي إجراء [تدوير](/l/ar/developers/self-host/capabilities/key-rotation).
## تدوير الأسرار ومفاتيح التوقيع
لمهام التشغيل اليومية مثل تدوير `ENCRYPTION_KEY`، أو تدوير مفتاح توقيع JWT، أو إبطال مفتاح توقيع تم تسريبه، راجع [دليل تدوير المفاتيح (Key rotation guide)](/l/ar/developers/self-host/capabilities/key-rotation).
## التحقق من حالة الترقية
يتيح لك الأمر `upgrade:status` فحص الحالة الحالية لمثيلك وعمليات ترحيل مساحات العمل. يكون مفيدًا لاستكشاف مشكلات الترقية وإصلاحها أو عند تقديم طلب دعم.
قم بتشغيله من حاوية الخادم:
```bash
docker exec -it {server_container_name_or_id} yarn command:prod upgrade:status
```
مثال على المخرجات:
```sh
APP_VERSION: v1.23.0
Instance
Inferred version: 1.23.0
Latest command: 1.23.0_DropWorkspaceVersionColumnFastInstanceCommand_1785000000000
Status: Up to date
Executed by: v1.23.0
At: 2026-04-16T11:43:58.823Z
Workspace
Apple (20202020-1c25-4d02-bf25-6aeccf7ea419)
Inferred version: 1.23.0
Latest command: 1.23.0_UpdateGlobalObjectContextCommandMenuItemsCommand_1780000005000
Status: Up to date
Executed by: v1.23.0
At: 2026-04-16T11:44:09.361Z
Summary
Instance: Up to date
Workspaces: 1 up to date, 0 behind, 0 failed (1 total)
```
### خيارات
| خيار | الوصف |
| ------------------------- | ----------------------------------------------------------- |
| `-w, --workspace-id <id>` | لتصفية حسب مساحة عمل معيّنة. يمكن تمريره عدة مرات. |
| `-f, --failed-only` | إخفاء مساحات العمل المحدَّثة، وعرض المتأخرة أو الفاشلة فقط. |
## استكشاف الأخطاء وإصلاحها
إذا فشلت الترقية في بعض مساحات العمل، فلن يتجاوز الخادم الخطوة الفاشلة. إعادة تشغيل الخادم (`docker compose up -d`) ستعيد محاولة الترقية من حيث توقفت.
لتحديد المشكلات بسرعة، قم بتشغيل:
```bash
docker exec -it {server_container_name_or_id} yarn command:prod upgrade:status --failed-only
```
يعرض هذا فقط مساحات العمل المتأخرة أو التي فشلت، مع رسالة الخطأ لكل حالة فشل.
## قبل v1.23
إذا كان مثيلك أقدم من v1.23، فيجب عليك الترقية تدريجيًا عبر كل إصدار رئيسي موسوم (من v1.6 إلى v1.7، ثم من v1.7 إلى v1.8، وهكذا) حتى تصل إلى v1.23. ومن هناك، يمكنك الانتقال مباشرةً إلى أحدث إصدار.