# Can't Create Repository (Windows)

**URL:** <https://community.cratedb.com/t/cant-create-repository-windows/943>\
**Category:** CrateDB\
**Created:** [December 15, 2021, 3:56pm UTC](https://community.cratedb.com/t/cant-create-repository-windows/943 "2021-12-15T15:56:35Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Todd\_Bryant](https://sea2.discourse-cdn.com/flex020/user_avatar/community.cratedb.com/todd_bryant/32/285_2.png) [@Todd\_Bryant](https://community.cratedb.com/u/Todd_Bryant)\
**Post date:** [December 15, 2021, 3:56pm UTC](https://community.cratedb.com/t/cant-create-repository-windows/943/1 "2021-12-15T15:56:35Z")

</div>

```sql
CREATE REPOSITORY repo1 TYPE fs WITH (location='c:\backups\',compress=true);

```

causes

```auto
Error!

RepositoryException[[] [repo1] failed to create repository]

```

Node is started with Admin rights on the server.

---

<div class="post-metadata">

**Author:** ![proddata](https://sea2.discourse-cdn.com/flex020/user_avatar/community.cratedb.com/proddata/32/1379_2.png) [@proddata](https://community.cratedb.com/u/proddata)\
**Post date:** [December 15, 2021, 4:21pm UTC](https://community.cratedb.com/t/cant-create-repository-windows/943/2 "2021-12-15T16:21:03Z")

</div>

I am not on a Windows machine right now, but I think you have to escape the backslashes

```sql
CREATE REPOSITORY repo1 TYPE fs WITH (location='c:\\backups',compress=true);

```

---

<div class="post-metadata">

**Author:** ![Todd\_Bryant](https://sea2.discourse-cdn.com/flex020/user_avatar/community.cratedb.com/todd_bryant/32/285_2.png) [@Todd\_Bryant](https://community.cratedb.com/u/Todd_Bryant)\
**Post date:** [December 15, 2021, 4:38pm UTC](https://community.cratedb.com/t/cant-create-repository-windows/943/3 "2021-12-15T16:38:26Z")

</div>

Thanks! That did not work!

---

<div class="post-metadata">

**Author:** ![Valeriy\_Dzhura](https://sea2.discourse-cdn.com/flex020/user_avatar/community.cratedb.com/valeriy_dzhura/32/433_2.png) [@Valeriy\_Dzhura](https://community.cratedb.com/u/Valeriy_Dzhura)\
**Post date:** [December 16, 2021, 1:55am UTC](https://community.cratedb.com/t/cant-create-repository-windows/943/4 "2021-12-16T01:55:45Z")

</div>

I think you should set **path.repo** in [CrateDB settings](https://crate.io/docs/crate/reference/en/4.6/config/node.html#path-repo):

> **path.repo**
> 
> _Runtime:_ `no`
> 
> A list of filesystem or UNC paths where repositories of type [fs](https://crate.io/docs/crate/reference/en/4.6/sql/statements/create-repository.html#sql-create-repo-fs) may be stored.
> 
> Without this setting a CrateDB user could write snapshot files to any directory that is writable by the CrateDB process. To safeguard against this security issue, the possible paths have to be whitelisted here.
> 
> See also [location](https://crate.io/docs/crate/reference/en/4.6/sql/statements/create-repository.html#sql-create-repo-fs-location) setting of repository type `fs` .
