docs/src/import.md

changeset 408
f71eab18ed38
equal deleted inserted replaced
407:9505224d2fd2 408:f71eab18ed38
1 ---
2 title: 'dav import'
3 ---
4
5 **`dav import [-pc] [-k <key>] [-L <lock>] <url> <file>`**
6
7 Uploads the content of an archive file to a collection. If the url points to a non-existing collection, the collection is created.
8
9 Currently the only available archive format is the ustar format. You can use tools like *tar* or the [dav export][1] command to create such archives.
10
11 **`-p`** disable file name encryption and decryption
12
13 **`-c`** enable file name and content encryption
14
15 **`-R`** upload directory
16
17 **`-k <key>`** use the specified key for encryption. The key must be configured in
18 the config.xml file
19
20 **`-L <lock>`** use a lock token. See [dav lock][2]
21
22 [1]: ./export.html
23 [2]: ./lock.html
24
25 ### Example: create tar archive with GNU tar and import it to a collection
26
27 $ tar cvf archive.tar --format=ustar mydir
28 mydir/
29 mydir/file.txt
30 mydir/otherfile
31 mydir/newfile
32 $ dav import myserv/col/ archive.tar
33 mkcol: mydir/
34 mydir: SRC/file.txt
35 mydir: SRC/otherfile
36 mydir: SRC/newfile
37

mercurial