Now CLI command to delete ALL backups for a user

I have a VPS that is having problems completing backups. I can’t delete backups, and I can’t get them to run succesfully.

I have tried 3-4 times to run this command
sudo /usr/local/hestia/bin/v-backup-users

but then I cannot see backups in the path that I expect. I think that this takes about 40 minutes to run, I can’t tell for sure

then, when I try to use the FIND command to locate files larger than 1gb, I get errors
find / -type f -size +1G
/proc/kcore
find: ‘/proc/148381/task/148381/fdinfo/5’: No such file or directory
find: ‘/proc/148381/fdinfo/6’: No such file or directory
find: ‘/proc/148409’: No such file or directory
find: ‘/proc/148410’: No such file or directory

I don’t know what the part about can’t find means, I don’t really understand how the find command works, I normally use locate and updatedb.

So at SOME point, I need to cleanup backups in order to take more backups.
At this URL I see reference to v-delete-user-backups

jaapmarcus commented on Nov 2, 2021
For command line/api call v-delete-user-backups username and for UI we need to change

[FEATURE] Ask to remove backup files when deleting account · Issue #2207 · hestiacp/hestiacp · GitHub

but I don’t see that CLI command anywhere
root@servername:~/scripts# locate v-delete-user-backups
root@servername:~/scripts#

has that CLI command dissappeared? Why isn’t there a way to delete ALL the backups for a user?

Is there any other hope that I have for getting a current set of backups on this VPS?

Oh, right now I Just noticed I could kick off a backup for a single user manually. If that works (i’ll know in 20 minutes) then I’ll be pretty happy. I just want to archive off my work for this server and continue testing.

Currently there is non

v-list-users-backups user will list all backups
And then a for loop to remove them

#!/bin/bash
for  backup  in $(v-list-user-backups $user plain | cut -f1); do 
    v-delete-user-backup $user $backup
done

Will do the trick

for what it is worth your backups simply reside in /backup , so you could simply change into that folder and list it’s content for starters.

of course you could try to find all large files with a find command, but that runs across the whole filesystem for no reason :wink:
that it gives some errors during the run is normal and depends on permission and such as there are more than just files and folders in your system. without wanting to dive too deep into details, especially those related to /proc you can simply ignore and have nothing to do with your problam at hand.

if your backups do not appear in /backup you should at least find some logfiles there per user, which might hold some information.

how much free space does your system have? for creating a backup you might need some, the routine is checking for at least double size of what is supposed to be backed up.
this is because it creates multiple archives and puts that together in another tar, so during the process you’ll temporary need some room and best guess is, this is why it fails for you here.

I am afraid this is not enough knowledge to manage a VPS, ideally you want to build some more fundamental linux basics, no offense, just saying.

1 Like

but again, my backups are failing to complete. you’re right, I should run that find command just in the /backups dir. I just don’t understand why a find command would fail ever.

I guess that I’m going to need to double the disk space on the VPS and restart the server and see about kicking off backups again. I Just wish that IF I didn’t have adequate disk space for a backup to complete, I wish I had a simple error.

again, there is nothing wrong with your find command in general. it does not fail.
it just can’t find, what’s not there…

and you do not need to run that in the /backup folder. the files should be directly there. if they aren’t then there are no backups created at all

am I allowed to delete backups in /backup using a shell command ? Or do I need to delete these files using the GUI?

And can at least someone confirm that we USED to have a command to delete all backups for a user, and that CLI command is no longer present?

For many of my VPS I have ~100 users, and I don’t want to write a script to handle 500 different backups just to find the one that I want.

Not tested tm…

of course you can remove files via shell. however HestiaCP will not automatically detect these changes. so in the GUI you still might see backups, that you manually deleted.

thanks for that info. I just want to delete ALLLL my backups server wide, and then kick off 1 backup (without increasing the size of the VPS).

4.5gb in upload directory for 1 site.
3 databases that are 300mb each

VPS has a total of 25gb space, and I can’t get ANYTHING to backup successfully since the 13th, 6 days ago

Run the following command as root and it will delete all backups.

#!/bin/bash
for user in $(v-list-users plain | cut -f1); do 
   for  backup  in $(v-list-user-backups $user plain | cut -f1); do 
      v-delete-user-backup $user $backup
   done
done
1 Like

so, how much free disk space do you have and have you checked what’s in /backup ?

sure you can delete the old backups, if you transferred them out already or do not need them anymore, so you get room for a fresh one.

Why not get yourself a webdav and send all your backups over there? Very easy setup through gui… There are also some threads on using google drive but you would have to mount it yourself.

I’m stuck in a backup-loop without success. 50gb VPS. ONE site has 5gb of pictures in the uploads DIR. THREE databases for WP are 300mb. And the MOST IMPORTANT site I care about , backups won’t ever complete.

I’m sorry man. WebDav. That protocal is derived from FrontpageServerExtensions, isn’t it? Can you give me a good example? I don’t wanna google it, and I think my NEXT storage investment is gonna be the S3-compatable storage on Linode. But I’m kinda scared of it.

To be frank, my EMAIL difficulties are making me want to leave linode entirely

Any kind of errors?

My 6 sense doesn’t work over the internet and we can’t access any server that we don’t belong. Check the error logs to see what happens.

sorry man, but what am I supposed to do with that information? I don’t need another class in math, just get that free disk space available to see if your backup can be created or not. should be simple. :grin:

as long as you keep ignoring what’s written or suggested, you’ll be stuck in your loop otherwise… :man_shrugging:t2:

I meant SFTP … It is what HestiaCP supports out of the box and works great for my backups… I set it up through GUI and it just runs at night.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.