Cleanup of temp storage with feature request/suggestions :)

Hi,

I think I posted this as a feature request or something along those lines - it might have gotten lost somewhere :slight_smile:

My server has been running for a few days without issue but then the server process “crashed” or was killed or something.

Long story short, this has left about 100gig of files in the temp directory (rough calc) which will basically slow the backups down while waiting for free space on the temp directory. As a result, can I make the following suggestions:

  • Store temp files in a directory which is created per client, per job - something like ${tmp}+"/"+${client_name}+"_"+${job_id}/
  • Remove these when the server is started based on job status - job was completed/crashed etc
  • Remove the whole directory at the end of the job
  • Possibly move the data to final storage if the job is resumed ?

With regards to the last point, it might be faster to hash check these files with the client and avoid re-transmitting them, compared to hash checking against the final destination - this will avoid moving files from a crashed job to the final destination that might have been transferred in part ?

Thanks :slight_smile:

Pieter

On Windows is cleans it on startup. On Linux this not enabled. Use Systemd’s PrivateTmp directive, or a tmpfs fs (or a wrapper). Many Linux distributions also clean /tmp + /var/tmp on startup.

If you do not change the defaults it creates a separate tmp location in each file backup dir.

Thanks for the reply - may I ask:

  • Why is this done under Windows only ? - I understand that you can’t delete /tmp/* but surely if you create /tmp/urbackup you can remove that ?
  • Why does it only create the directories if you using /tmp ? Surely this is a good thing to do no matter where the tmp is ?

What do you think of the other points ?

Thanks !