Tar source archive `removeDir` is not being used #51

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

Comments

Projects
None yet
2 participants
@sebastiaanluca

\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

This comment has been minimized.

Show comment
Hide comment
@sebastianfeldmann

sebastianfeldmann Feb 6, 2016

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 ;)

Owner

sebastianfeldmann commented Feb 6, 2016

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

This comment has been minimized.

Show comment
Hide comment
@sebastiaanluca

sebastiaanluca Feb 6, 2016

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.

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

Add option to remove the source directory - issue #51
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

This comment has been minimized.

Show comment
Hide comment
@sebastianfeldmann

sebastianfeldmann Feb 26, 2016

Owner

I activated the removeSourceDir option.
Will be released in 3.1.1

I activated the removeSourceDir option.
Will be released in 3.1.1

@sebastianfeldmann

This comment has been minimized.

Show comment
Hide comment
@sebastianfeldmann

sebastianfeldmann Feb 26, 2016

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.

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

This comment has been minimized.

Show comment
Hide comment
@sebastiaanluca

sebastiaanluca Feb 29, 2016

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

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