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

[Enhancement] Temporary directory for backup #286

Open
myroad94 opened this issue Oct 31, 2020 · 1 comment
Open

[Enhancement] Temporary directory for backup #286

myroad94 opened this issue Oct 31, 2020 · 1 comment

Comments

@myroad94
Copy link

Hi,

I use oandbackup extensively with scheduling frequent backup. As soon as the backup are done, I upload these with Nextcloud automatically in Android.
The thing is the backup first start with uncompressed files (for data), so I have lots of random name file because it is detected by Nextcloud while oandbackup is still constructing the archive. This generated tons of failed upload in Nextcloud client because they are deleted quickly after the archive is done.
The solution is quite simple in theory: it would require to set in oandbackup a different temporary directory to do all these work and do an atomic move of the archive at the end :) The temporary directory can be a parameter, or it could be /tmp as long as the directory is purged each time the archive is done to avoid space issue.

Is-that possible? Thank you!

@myroad94
Copy link
Author

If the author does not have time, maybe I can do a pull request with a simple implementation (/tmp). I guess it is a simple matter of changing this line https://github.com/jensstein/oandbackup/blob/master/src/main/java/dk/jens/backup/tasks/BackupTask.java#L36 to an arbitrary temporary directory, and adding a Files.move after that?

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