Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PATH arguments listed twice when backup is created #12

Open
jpellenz opened this issue Mar 16, 2018 · 1 comment
Open

PATH arguments listed twice when backup is created #12

jpellenz opened this issue Mar 16, 2018 · 1 comment

Comments

@jpellenz
Copy link

Steps to reproduce:

  1. Create a borgbackup.ini file with PATH entries:
    ...
    PATH = /tmp/project
    PATH = /tmp/project2
    ...

  2. Create a backup

  • ./borgctl backup ./borgbackup.ini
  1. Expected behavior
  • elements in path are listed once
  1. Actual behavior
  • elements in path are listed twice:
    -+> BACKUP for 001 ...
    -+> borg create -s -v --list -C zlib,6 ::tftp-201803162311170100 /BACKUP//tmp/project /BACKUP//tmp/project2 /BACKUP//tmp/project /BACKUP//tmp/project2
    U /BACKUP/tmp/project/test1.txt
    U /BACKUP/tmp/project/test2.txt
    d /BACKUP/tmp/project
    A /BACKUP/tmp/project2/test1.txt
    A /BACKUP/tmp/project2/test2.txt
    d /BACKUP/tmp/project2
    U /BACKUP/tmp/project/test1.txt
    U /BACKUP/tmp/project/test2.txt
    d /BACKUP/tmp/project
    U /BACKUP/tmp/project2/test1.txt
  1. Probably the problem is in the BACKUPS[PATH${id}] contruction in help_init_from_ini():

In help_init_from_ini():

 ...
                            if [[ "$2" == "PATH" ]]; then
                                    BACKUPS[PATH${id}]="${BACKUPS[PATH${id}]} ${3}"
                            fi
 ...

Since help_init_from_ini() is called multiple times (from docker_compare_host_container_script() and docker_set_borg_repo()), the BACKUPS[PATH${id}] is extended twice by the PATH arguments.

@jpellenz jpellenz changed the title PATH listed double when created backup PATH arguments listed twice when backup is created Mar 16, 2018
@jpellenz
Copy link
Author

Seems to be a side effect from commit c2f53a3 where the second call to help_init_from_ini() was introduced.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant