github.com/pachyderm/pachyderm@v1.13.4/doc/docs/1.11.x/how-tos/export-data-out-pachyderm/export-data-pachctl.md (about) 1 # Export Your Data with `pachctl` 2 3 The `pachctl get file` command enables you to get the contents 4 of a file in a Pachyderm repository. You need to know the file 5 path to specify it in the command. 6 7 To export your data with pachctl: 8 9 1. Get the list of files in the repository: 10 11 ```shell 12 pachctl list file <repo>@<branch> 13 ``` 14 15 **Example:** 16 17 ```shell 18 pachctl list commit data@master 19 ``` 20 21 **System Response:** 22 23 ```shell 24 REPO BRANCH COMMIT PARENT STARTED DURATION SIZE 25 data master 230103d3c6bd45b483ab6d0b7ae858d5 f82b76f463ca4799817717a49ab74fac 2 seconds ago Less than a second 750B 26 data master f82b76f463ca4799817717a49ab74fac <none> 40 seconds ago Less than a second 375B 27 ``` 28 29 1. Get the contents of a specific file: 30 31 ```shell 32 pachctl get file <repo>@<branch>:<path/to/file> 33 ``` 34 35 **Example:** 36 37 ```shell 38 pachctl get file data@master:user_data.csv 39 ``` 40 41 **System Response:** 42 43 ```shell 44 1,cyukhtin0@stumbleupon.com,144.155.176.12 45 2,csisneros1@over-blog.com,26.119.26.5 46 3,jeye2@instagram.com,13.165.230.106 47 4,rnollet3@hexun.com,58.52.147.83 48 5,bposkitt4@irs.gov,51.247.120.167 49 6,vvenmore5@hubpages.com,161.189.245.212 50 7,lcoyte6@ask.com,56.13.147.134 51 8,atuke7@psu.edu,78.178.247.163 52 9,nmorrell8@howstuffworks.com,28.172.10.170 53 10,afynn9@google.com.au,166.14.112.65 54 ``` 55 56 Also, you can view the parent, grandparent, and any previous 57 revision by using the caret (`^`) symbol with a number that 58 corresponds to an ancestor in sequence: 59 60 * To view a parent of a commit: 61 62 1. List files in the parent commit: 63 64 ```shell 65 pachctl list commit <repo>@<branch-or-commit>^:<path/to/file> 66 ``` 67 68 1. Get the contents of a file: 69 70 ```shell 71 pachctl get file <repo>@<branch-or-commit>^:<path/to/file> 72 ``` 73 74 * To view an `<n>` parent of a commit: 75 76 1. List files in the parent commit: 77 78 ```shell 79 pachctl list commit <repo>@<branch-or-commit>^<n>:<path/to/file> 80 ``` 81 82 **Example:** 83 84 ```shell 85 NAME TYPE SIZE 86 /user_data.csv file 375B 87 ``` 88 89 1. Get the contents of a file: 90 91 ```shell 92 pachctl get file <repo>@<branch-or-commit>^<n>:<path/to/file> 93 ``` 94 95 **Example:** 96 97 ```shell 98 pachctl get file datas@master^4:user_data.csv 99 ``` 100 101 You can specify any number in the `^<n>` notation. If the file 102 exists in that commit, Pachyderm returns it. If the file 103 does not exist in that revision, Pachyderm displays the following 104 message: 105 106 ```shell 107 pachctl get file <repo>@<branch-or-commit>^<n>:<path/to/file> 108 ``` 109 110 **System Response:** 111 112 ```shell 113 file "<path/to/file>" not found 114 ```