---
title: "DAF Files & DupArchive Extraction Tool"
url: https://phatdev.net/docs/sl-migrations/how-to-work-with-daf-files-and-the-duparchive-extraction-tool
lang: vi
updated: 2026-10-20
alternate:
  en: https://phatdev.net/en/docs/sl-migrations/how-to-work-with-daf-files-and-the-duparchive-extraction-tool
markdown: https://phatdev.net/docs/sl-migrations/how-to-work-with-daf-files-and-the-duparchive-extraction-tool.md
---

# DAF Files & DupArchive Extraction Tool

Thuộc bộ tài liệu: [SL Migrations](https://phatdev.net/docs/sl-migrations.md)

> Định dạng .daf: cấu trúc, cách giải nén bằng installer và lưu ý về công cụ dòng lệnh.

## DAF Files & Extraction Tool

`.daf` (DupArchive Format) là định dạng archive riêng của engine DupArchive. Khác với ZIP, archive được ghi và đọc theo từng khối nhỏ, mỗi khối có mã băm riêng → hỗ trợ tiếp tục (resume) khi bị gián đoạn và không bị giới hạn kích thước như ZipArchive ở bản PHP cũ.

## Cấu trúc

```
[Header]
  - Cờ (nén, mã hoá) và phiên bản định dạng
[Lần lượt từng mục]
  - Thư mục: đường dẫn, quyền, thời gian sửa
  - File: đường dẫn, kích thước, mã băm
          + các khối nội dung (mỗi khối có mã băm riêng)
```

## Giải nén

Cách được hỗ trợ là mở `installer.php` trên server đích: installer đọc archive theo từng lô nhỏ qua AJAX, tự gọi lô kế tiếp và có thể tiếp tục khi bị gián đoạn. Xem [Classic Install](https://phatdev.net/docs/sl-migrations/classic-install).

> Lưu ý: bản SL Migrations hiện tại không kèm công cụ giải nén dòng lệnh riêng cho `.daf` (không có `duparchive-extract.phar`, cũng không có các cờ `--list`, `--info`, `--verify`, `--extract-file`). Muốn giải nén thủ công bằng dòng lệnh, hãy build archive **ZIP** (engine ZipArchive hoặc Shell Exec) rồi làm theo [Two-Part Install](https://phatdev.net/docs/sl-migrations/two-part-install).

## Kiểm tra tính toàn vẹn

Mỗi khối nội dung trong `.daf` có mã băm riêng, và installer kiểm tra khi đọc. Nếu archive hỏng hoặc tải lên không đủ, bước giải nén báo lỗi ở file tương ứng; tải lại archive từ nguồn hoặc từ bản sao lưu rồi chạy lại.

## Tham khảo

- [Two-Part Install](https://phatdev.net/docs/sl-migrations/two-part-install)
- [Zip engines](https://phatdev.net/docs/sl-migrations/how-to-work-with-the-different-zip-engines)
