Help Center/
GaussDB/
Best Practices/
Best Practices for Import and Export Using COPY/
Best Practices for Import and Export Using COPY (Centralized Instances)/
Typical Scenarios
Updated on 2025-09-04 GMT+08:00
Typical Scenarios
Preparations
During import or export using COPY, the database requires file read/write permissions on the server. To grant these permissions, enable the enable_copy_server_files parameter.
gs_guc reload -I all -N all -Z datanode -c "enable_copy_server_files=on"

- Parameters in the COPY import command must match the actual data in files, including the format, delimiter, newline character, and character set.
- If the specified client-side encoding matches the server-side encoding, the COPY command preserves the binary form of data during import and export, preventing any structural damage that may result from transcoding. This mechanism guarantees the integrity and originality of data migration, making it suitable for scenarios that demand high fidelity.
- Using the Recommended CSV Format
- Importing and Exporting Data with Extreme Performance
- Exporting Data Files for Manual Parsing
- Importing and Exporting Data When Only the TEXT Format Is Available
- Importing and Exporting Data Files on a GSQL Client
- Importing and Exporting Data Through the JDBC Driver
- Importing Erroneous Data Through Error Tolerance
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
The system is busy. Please try again later.
For any further questions, feel free to contact us through the chatbot.
Chatbot