Cleaning up Storage



I have a 12TB RAID6 array that I am using as my UrBackup storage on a Windows Server 2016 box.

I am running pretty low on storage so I have disabled image backups for machines that really don’t require it, and readjusted my retention settings.

It seems the nightly auto cleanup runs very slow…and when I attempt to delete a bunch of backups from the web console by going to “Backups” – it just times out on me and doesn’t actually delete anything.

Is there any danger in just going into the UrBackup server and deleting the files from my storage partition in Windows? Will that cause any damage to the UrBackup database?

What’s the correct protocol to clear out backups to free up storage space in this scenario?



The two sections there
these should run with the service stopped

The order i would try to do things :
Before anything, make sure to update the server, to make sure you are not affected by some old retention bug.

Try a urbackupsrv remove-unknown
It will cleanup old files that are leftover from old bugs, canceled backup, manually deleted files (like you wanted to do), borked migrations and whatnot stuff that you wouldn’t be able to restore normally anyway.
It s also very long. On 12TB, it could literally take days (run it in a screen).

Going to the console and marking backup for deletion should be fast. What should be slow is the “delete now” button. Marked for deletion should be deleted during the maintenance period, (midnight or so). So you can mark a bunch of them and wait for midnight.

urbackupsrv cleanup --amount x
Readup the help on it. You can clean by percentage or size. I dont remember if that’s what too keep or what to delete. :slight_smile:. It “almost” amount to change the quota setting.


Hi orogor

Thanks for your reply! Just to make sure I understand… it should be okay to manually delete backup files on my Windows server box then run the urbackupsrv remote-unknown script to clean up the database of the deleted files?

If I did this and the UrBackup service had to be stopped while it was running, that means that new backups wouldn’t be taken for who knows how many days it takes for 12TB of data to be sorted though. Is there a better way so that I can continue to allow backups to be taken?

And yes, the actual deleting process during the maintenance window is rather slow… but I’m guessing that’s normal.


Yes, but it is not what i am recommending.

If I did this and the UrBackup service had to be stopped while it was running, that means that new backups wouldn’t be taken for who knows how many days it takes for 12TB of data to be sorted though.

Yes it has to be stopped.

Is there a better way so that I can continue to allow backups to be taken?

I use two different backup servers, instead of replicating one to the other one.


Marking old backups for deletion then allowing nightly cleanup to deal with them is what I’d recommend, slow or not.

The other possible methods aren’t all that much faster anyway. That also includes the cleanup ops after manual deletion.


Hi, sorry, might be off topic, but how do you setup this environment. And is this a good way to make backups redundant? Because I have 42TB Backup and want to replicate it. I’m searching for the best way to do so…maybe you can PM me or open a new thread on this (other people might also be interested in it)…

Thanks in advance



This has been discussed a few times in the forums.


The way uroni (the urbackup dev) recommends:
He use zfs/btrfs builtin sync features.
So at the block level of the urbackup partition, only changes are copied.
And that would sync everything including the conf and whatnot
I dont think you could have the two instances running at the same time, for backup cleanup , that wouldn’t help.
That should lead to less traffic than using mutiple backup servers.


The way i do it, i use two completely different instances of urbackup.
The annoying thing about 2 different servers; is that you need to manually configure each server, add each client in each servers. The settings aren’t replicated between servers.

  • If you use the same key on both server, the client will connect to both transparently (if you use different key, you need to install the key on each client).
    Local servers are autodiscovered if they have an interface on the same lan than the client.

If you want a remote/internet server as redundancy, this was discussed in a recent topic :

  • You also set the internet server adress (server side config) as the name of your remote/internet server.
    do this in local and remote server.
    The local server will autodiscover the client, the client will install it’s key. Because the key is the same, the client will be able to connect to the internet server that you configured on your local server.

Internet mode transfers only file differences (cost some cpu to compute), compress transferred data, and urbackup in general doesn’t sends 2 times the same file. Still it should use more bandwidth than a zfs/btrfs sync.

With two server you can use different retention, backup periods and whatnot, for example :

  • Like one server backup Monday, Wednesday, Friday
  • the other Tuesday, Thursday, Saturday each keep backup for 60 days
  • An online server that backup only Sunday and keep 30 backups.


Since this post, I have marked a number of backups for deletion and it looks like the cleanup window is running slower than new backups are being taken, which is resulting in more disk space being consumed than freed up. As of ths post, I’m down to 947GB.

At this rate, my storage array is going to fill up before the cleaner can ever have a chance to fully run and clear up disk space. Does the cleaner normally take this long to delete backups? It looks like it’s deleting about 5 incremental backups an hour on average.

What should I do at this point? I’m thinking I just need to manually delete files from Windows storage server and run the urbackupsrv remove-unknown script to avoid my storage completely filling up.

Thank you


Running remove-unknown will also remove any backups marked for deletion at the same time, so no great need for manual deletion of files. Be advised it will stop the server during the process so no new backups will occur, and it’s slower than pouring molasses in January. I’ve personally seen it take more than 24 hours to complete and I’d only marked backups to be deleted from one client…


Thanks for the tip – I’ve started the remove-unknown, going to let it run all weekend long and see how far it gets. :slight_smile:


Thanks for your explanation. Gonna check every possibility…