Feature request: switch "use TMP" or "don´t use TMP"

Hi Uroni,

as far as I remember UrBackup pulls each file from clients to temp folder and then when it´s complete it moves it to the backup path.
As I read in another thread there seems to be a performance issue if something goes wrong with temp folder and I can confirm that: if the drive on which I set the temp runs out of space, backups lag and hang.

Wouldn´t it be better to either write the temp file in the destination folder and rename it after completion? so the mechanism to delete enough backups to grant enough free space for the backups would work for temp files, too, as it does not yet. Another bonus: if temp folder is on another drive, moving the file from temp to destination may last many minutes and consume much more performance than a simple rename.

Another thing one could imagine is to set UrBackup NOT to write temp files before copying, but I maybe this would result in corrupt backups if the clients go off whilst backup.

If the backups hang because there is not enough space in the temporary folder, it is a bug, and I would be interested in how to reproduce it. Log files would be helpful as well.

That said, I realized that many have issues with the temporary files and did just what you proposed.
Here
https://sourceforge.net/projects/urbackup/files/Server/1.1RC/
is a version where you can turn off the temporary file buffer for either image or file backups. It is off by default, so if you want the old behaviour back you have to check it in Settings->Advanced .
I still think the old way is better – of course only if you have enough temporary space on a separate fast volume.

Hi Uroni,

of course they hang lacking space in temp folder. What else? ;) What Log files do you need?

I installed the new version - let´s see if this works better for me… I have 40GB for C (Windows) and a 1TB drive for backups - where should I place temp files? If I use C the windows partition runs out of space and backups hang, if I use D backups hang also. So for me this option is better I think.

[quote=“fossy777”]
of course they hang lacking space in temp folder. What else? ;) What Log files do you need?[/quote]

Well the question is if it hangs, because of a reason (i.e. the temporary file drive is slower, or the backup drive is full) or that it is a bug. The server log file would be the right one. Relevant parts of it (or everything) compressed to martin@urbackup.org . Thanks!

If you turn off the temporary file buffer in the new version it does not write to the temporary folder anymore, so it should not matter where it is. Best put it on C:\ such that a full backup drive does not disturb applications (including UrBackup).

4GB ?!? Next feature request: settings for limiting server log size… ;)

Sent you the log

Thanks.

The 4GB logfile is largely caused by it crashing on 2012-11-12 and then going a little bit haywire (or did you restart it afterwards). The crash was apparently caused by it not having enough space to write to the database. That’s propably why you moved the temporary files somewhere else. The thing that did go haywire was the reading from the temporary image data. It fails to read from the temporary file, so somehow it must have been shrunk or the file handle invalidated while the server was running. I’ve put a stopgap there so that it does immediatly throw one error and fail, but I cannot imagine how it could have happend.
All the other stalls are caused by the Server now having to delete backups, because it runs out of space. I’ve put a status message in server interface in the new version now, so you should be able to see when this happens.

Hi Uroni,

the log file still is as big. Do I have to delete it manually?

The new server version works again and I didn´t check neither “Temporary files as file backup buffer” nor “Temporary files as image backup buffer” but there still are files in the former Urbackup-TMP-folder under access and the speed is also still really slow. Any suggestion?

Yes it does not roll over automatically.

You should see the server storing the temporary files in the urbackup_tmp_files directory in the backup storage folder. It should not create any temporary files for image backups anymore, but it can still create temporary databases in the temporary folder, especially during file backups. (If any of that is not true something is wrong)

I saw in the logfile, that there is no space in the backup storage. In that case UrBackup interrupts the current backup and cleans up old ones. You could lower the max file/image backup number to do this clean up at night. Your version should now also tell you that this cleanup is happening on the status page (it definitely logs it into the log file).