sebastianfeldmann / phpbu

PHP Backup Utility - Creates and encrypts database and file backups, syncs your backups to other servers or cloud services and assists you monitor your backup process
https://phpbu.de
Other
1.3k stars 110 forks source link

Feature request: move tar --exclude options to the beginning of the command #300

Open chrisrollins65 opened 3 years ago

chrisrollins65 commented 3 years ago

I'm trying to exclude the composer vendor directory from my project's backups. The problem is my project has multiple vendor directories. To exclude only the composer vendor directory I need to do --exclude=/absolute/path/to/project/vendor. Tar is capable of doing this, but only if the --exclude option is placed at the beginning of the command, (before the cvf filename... stuff).

I'm not sure how difficult this would be the way the code is currently structured, but it would be a welcome improvement. For the time being I'll just include the vendor folder in my backups because the other non-composer vendor folders are important to keep. Or I'll see about renaming them.