# Exclude and include list from file

**URL:** <https://kopia.discourse.group/t/exclude-and-include-list-from-file/3464>\
**Category:** General Topics\
**Created:** [November 21, 2024, 10:46am UTC](https://kopia.discourse.group/t/exclude-and-include-list-from-file/3464 "2024-11-21T10:46:25Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![nunotexbsd](https://yyz2.discourse-cdn.com/free1/user_avatar/kopia.discourse.group/nunotexbsd/32/1281_2.png) [@nunotexbsd](https://kopia.discourse.group/u/nunotexbsd)\
**Post date:** [November 21, 2024, 10:46am UTC](https://kopia.discourse.group/t/exclude-and-include-list-from-file/3464/1 "2024-11-21T10:46:25Z")

</div>

Hello all,

I’d like to have some sugestions about excluding and including files from cli command.

My example is:

From restic:

```auto
restic backup \
--exclude /home/USER/.cache \
--files-from /home/USER/etc/repo.list

```

Same from duplicity:

```auto
duplicity \
--exclude /home/USER/.cache \
--include-filelist /home/USER/etc/repo.list \
--exclude '**'

```

Where `repo.list` is:

```auto
/boot/loader.conf.local
/etc
/home
/usr/local/etc

```

Could I have some hints?

Thanks

---

<div class="post-metadata">

**Author:** ![kapitainsky](https://yyz2.discourse-cdn.com/free1/user_avatar/kopia.discourse.group/kapitainsky/32/535_2.png) [@kapitainsky](https://kopia.discourse.group/u/kapitainsky)\
**Post date:** [November 21, 2024, 3:25pm UTC](https://kopia.discourse.group/t/exclude-and-include-list-from-file/3464/2 "2024-11-21T15:25:38Z")

</div>

> **[Ignoring Files and Folders in Snapshots](https://kopia.io/docs/advanced/kopiaignore/#ignoring-files-and-folders-in-snapshots)**
>
> Fast and Secure Open-Source Backup Software for Windows, Mac, and Linux
