# COPY TO SYNTAX help

**URL:** <https://community.cratedb.com/t/copy-to-syntax-help/45>\
**Category:** SQL\
**Created:** [October 22, 2018, 9:52am UTC](https://community.cratedb.com/t/copy-to-syntax-help/45 "2018-10-22T09:52:12Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![roman](https://sea2.discourse-cdn.com/flex020/user_avatar/community.cratedb.com/roman/32/36_2.png) [@roman](https://community.cratedb.com/u/roman)\
**Post date:** [October 22, 2018, 9:52am UTC](https://community.cratedb.com/t/copy-to-syntax-help/45/1 "2018-10-22T09:52:12Z")

</div>

Hi I am receiving thie error when doing COPY TO with crate command:  
​  
crash --hosts 127.0.0.1 -c “copy metermaster22 to DIRECTORY ‘/crateBackup’”  
CONNECT OK  
SQLActionException[NotSerializableExceptionWrapper: unhandled _server\_exception: Failed to open output: '/crateBackup/metermaster22\_2_ .json (No such file or directory)’]  
​  
Please advice on the proper syntax. I have tried changing permissions and manually creating an output file first

[https://crate-community.slack.com/archives/C0L7GCE6R/p1539598394000100](https://crate-community.slack.com/archives/C0L7GCE6R/p1539598394000100)
