oandbackup icon indicating copy to clipboard operation
oandbackup copied to clipboard

[Enhancement] Temporary directory for backup

Open myroad94 opened this issue 5 years ago • 1 comments

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 avatar Oct 31 '20 10:10 myroad94

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?

myroad94 avatar Oct 31 '20 10:10 myroad94