borgbase / vorta

Desktop Backup Client for Borg Backup
https://vorta.borgbase.com
GNU General Public License v3.0
1.93k stars 127 forks source link

Exclude If Present #2016

Closed shivansh02 closed 5 days ago

shivansh02 commented 3 weeks ago

Description

Exclude directories where specified files are present.

Related Issue

1863

Motivation and Context

How Has This Been Tested?

Tested manually by running backups. Selected filenames get appended to borg create command as "--exclude-if-present filename". Modified test_exclusion_preview_populated to test preview tab.

Screenshots (if appropriate):

Screenshot from 2024-06-12 18-47-02 Screenshot from 2024-06-12 18-47-08

Types of changes

Checklist:

I provide my contribution under the terms of the license of this repository and I affirm the Developer Certificate of Origin.

m3nu commented 2 weeks ago

Testing this locally now. In the future, you can also rebase a new PR if there were commits in the meantime.

m3nu commented 2 weeks ago

Works as expected locally and passes the correct args to Borg.

I would still suggest to add some common example files in the dialog, but keep them unselected. Like the ones shown in Borg's docs.

shivansh02 commented 2 weeks ago

I would still suggest to add some common example files in the dialog, but keep them unselected. Like the ones shown in Borg's docs.

I added two files (.nobackup and .vortaignore). Did these not show up for you? I added the files as default value for exclude_if_present field in models.py and wrote a migration for the same. Did I miss something?

m3nu commented 5 days ago

I think we're good now. Let me run it again locally tonight.