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

Tar source archive removeDir is not being used #51

Closed
sebastiaanluca opened this issue Feb 6, 2016 · 5 comments
Closed

Tar source archive removeDir is not being used #51

sebastiaanluca opened this issue Feb 6, 2016 · 5 comments

Comments

@sebastiaanluca
Copy link

\phpbu\App\Backup\Source\Tar has a removeDir setting in its setup method to specify if the source directory should be removed after archiving, but it is not being used anywhere.

Shouldn't this be passed to the executable's (\phpbu\App\Cli\Executable\Tar) removeSourceDirectory method? See https://github.com/sebastianfeldmann/phpbu/blob/master/src/Backup/Source/Tar.php#L131.

@sebastianfeldmann
Copy link
Owner

Hi,
right now this is a undocumented feature idea ;)
I was a bit to anxious to add a rm -rfcommand to delete the directory.

The next major version of phpbu (3.0) will feature a --simulate option to run phpbu without executing anything but seeing all phpbu would do to make sure everything works as intended.

Maybe then I find the courage to implement this feature ;)

@sebastiaanluca
Copy link
Author

Good thinking, can't be to careful when running rm -rf on anything! I'll let the system garbage collect the remaining files in /tmp then, no problem.

@sebastianfeldmann sebastianfeldmann added this to the Version 3.1.0 milestone Feb 6, 2016
@sebastianfeldmann sebastianfeldmann removed this from the Version 3.1.0 milestone Feb 21, 2016
sebastianfeldmann added a commit that referenced this issue Feb 26, 2016
When backing up directories using the 'Tar' source it is now possible to add an option
named 'removeSourceDir' that will result in deleting the source directory after
compressing it.

WARNING:
Be careful with this option,  misusage under a privileged user like 'root' could lead
to severe data loss.
@sebastianfeldmann
Copy link
Owner

I activated the removeSourceDir option.
Will be released in 3.1.1

@sebastianfeldmann
Copy link
Owner

I will try to update the Laravel integration to version ~3.1 in the next couple of days so you can benefit from this changes.

@sebastiaanluca
Copy link
Author

Sweet man, thanks! No rush on the Laravel integration. I'm using your package directly using the Runner and Configuration classes :)

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

No branches or pull requests

2 participants