docs/src/import.md

Sun, 17 Dec 2023 14:25:34 +0100

author
Mike Becker <universe@uap-core.de>
date
Sun, 17 Dec 2023 14:25:34 +0100
changeset 797
edbb20b1438d
parent 408
f71eab18ed38
permissions
-rw-r--r--

[Makefile] fix missing rules preventing dry-runs

We have to support dry-runs, because many IDEs are using
dry-runs to collect build information.

Some rules have dependencies that expect certain files or
directories to be just present. We added respective build
rules which invoke the test program. This way, the behavior
when running make normally is exactly the same, but dry-runs
are also not failing now.

---
title: 'dav import'
---

**`dav import [-pc] [-k <key>] [-L <lock>] <url> <file>`**

Uploads the content of an archive file to a collection. If the url points to a non-existing collection, the collection is created.

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.

**`-p`** disable file name encryption and decryption

**`-c`** enable file name and content encryption

**`-R`** upload directory

**`-k <key>`** use the specified key for encryption. The key must be configured in
  the config.xml file

**`-L <lock>`** use a lock token. See [dav lock][2]

[1]: ./export.html
[2]: ./lock.html

### Example: create tar archive with GNU tar and import it to a collection

	$ tar cvf archive.tar --format=ustar mydir
	mydir/
	mydir/file.txt
	mydir/otherfile
	mydir/newfile
	$ dav import myserv/col/ archive.tar
	mkcol: mydir/
	mydir: SRC/file.txt
	mydir: SRC/otherfile
	mydir: SRC/newfile

mercurial