Using $HOME variable in exlude-filelist file

Asked by hanzomon4 on 2018-12-29

Hi,

I'm working on a backup script and would like to use $HOME in my --exclude-filelist file instead of full paths.

for example:
- $HOME/.cache instead of /home/my_home_folder/.cache

No matter how I try writing the path duplicity never expands the variable. Using a environment variable in the exlude file isn't outlined under the File Selections section of the man page. I assume that means I can't use $HOME in the way I want but thought I'd ask before going to plan b.

Question information

Language:
English Edit question
Status:
Answered
For:
Duplicity Edit question
Assignee:
No assignee Edit question
Last query:
2018-12-29
Last reply:
2018-12-29
edso (ed.so) said : #1

On 12/29/2018 10:17 PM, hanzomon4 wrote:
> New question #677223 on Duplicity:
> https://answers.launchpad.net/duplicity/+question/677223
>
> Hi,
>
> I'm working on a backup script and would like to use $HOME in my --exclude-filelist file instead of full paths.
>
> for example:
> - $HOME/.cache instead of /home/my_home_folder/.cache
>
> No matter how I try writing the path duplicity never expands the variable. Using a environment variable in the exlude file isn't outlined under the File Selections section of the man page. I assume that means I can't use $HOME in the way I want but thought I'd ask before going to plan b.
>

yes. the exclusion files do not expand env vars. but how about

- /home/*/.cache

?
that should work without having to know which users home. alternatively simply place duplicity's archive folder somewhere else.

..ede/duply.net

Can you help with this problem?

Provide an answer of your own, or ask hanzomon4 for more information if necessary.

To post a message you must log in.