Backing up my yunohost using web interface fails

My YunoHost server

Hardware: VPS bought online

YunoHost version: 11.1.18 (stable).

I have access to my server : Through SSH | through the webadmin

Are you in a special context or did you perform some particular tweaking on your YunoHost instance ? : yes

Description of my issue

Hello all, so, not sure why, but my backups keep on failing every time I try to run a manual backup from the web interface. I must appologize to anyone who heard a frustrated scream about 10 minutes ago, if you did, it was me screaming at my VPS and wishing I could just crush it to powder!

so if anyone is able to help save my vocal chords and my vps from being crushed into powder, I’d be very grateful. Thinking this is all because of a linux upgrade from linux 10, my servers default, to linux 11 which upgraded to version 4 something instead of 5 something, but as I’m running mastodon on the server, it’s going to be difficult to wipe and start again without all sorts of downtime and issues.

have pasted a unipaste link to the logs below, seems that a config file couldn’t be found which might be causing the issue?

I’m a total novice when it comes to installing linux or command line etc, had to get a techie friend to help me with that.

take care
craig.

https://paste.yunohost.org/raw/cijecozoba

Are you sure you have enough storage space on your vps an/or backup destination ?

At least 25GB as it’s said at the end of your log

2023-05-07 23:13:50,764: INFO - The archive will contain about 25.2GB of data.
2023-05-07 23:13:50,764: DEBUG - Creating the backup TAR archive...

Have a look on the dagnostic page, under System Ressources (in french here-under)

Or using ssh using df -h.

$ df -h
Filesystem      Size  Used Avail Use% Mounted on
udev            1.9G     0  1.9G   0% /dev
tmpfs           383M  856K  382M   1% /run
/dev/sda1        94G   56G   34G  63% /
tmpfs           1.9G   48K  1.9G   1% /dev/shm
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs           383M     0  383M   0% /run/user/66871

Hello tierce, I should have enough storage space, the drive is 500 GB
HDD, it’s vps though so probably not a physical 500 GB drive.
I’m totally blind so cant see that image, sorry.

the command you’ve given me is it just the first line I enter into the terminal?

on another note, the email notification I received telling me you’d replied said I could reply to the email to respond to the post, but the post never showed up on here so I think the implementation to pass the emailed reply back to the forum software mustn’t be working.
take care
craig

So can you elaborate on how exactly it “fails” ? In the logs you shared, we only see the backup “starting” to be created … but pretty much nothing after this

So what exactly happens that make you say it “fails”

Hello Aleks, the history on my dashboard says that it failed, I expand the item and it gives me a link to the logs I shared with you saying please share them to ask for help.

also right at the end of the logs it says

2023-05-07 23:20:45,765: DEBUG - Config panel /usr/share/yunohost/config_global.toml doesn’t exists

I presumed this was the error the system encountered.
take care
craig

so i’ve now tried again to backup my system after clearing all the old archives in yunohost.backup and in temp.

it still said failed, but there is no error in the logs or in the history. [starts to tear hair out]

History Last action: Unsuccessful Create a backup
Unsuccessful Create a backup View error 22:53:32
Collecting files to be backed up for chitchatter…
Declaring files to be backed up…
Backup script completed for chitchatter. (YunoHost will then actually copy those files to the archive).
Collecting files to be backed up for filepizza…
Declaring files to be backed up…
Backup script completed for filepizza. (YunoHost will then actually copy those files to the archive).
Collecting files to be backed up for librespeed…
Loading installation settings…
Declaring files to be backed up…
Backing up the MySQL database…
Backup script completed for librespeed. (YunoHost will then actually copy those files to the archive).
Collecting files to be backed up for mastodon…
Loading installation settings…
Declaring files to be backed up…
Backing up the PostgreSQL database…
Backup script completed for mastodon. (YunoHost will then actually copy those files to the archive).
Collecting files to be backed up for pyload…
Loading installation settings…
Declaring files to be backed up…
Backup script completed for pyload. (YunoHost will then actually copy those files to the archive).
Collecting files to be backed up for spftoolbox…
Loading installation settings…
Declaring files to be backed up…
Backup script completed for spftoolbox. (YunoHost will then actually copy those files to the archive).
Collecting files to be backed up for webmin…
Loading installation settings…
Declaring files to be backed up…
Backup script completed for webmin. (YunoHost will then actually copy those files to the archive).
Collecting files to be backed up for wetty…
Loading installation settings…
Declaring files to be backed up…
Backup script completed for wetty. (YunoHost will then actually copy those files to the archive).
Collecting files to be backed up for zeronet…
Loading installation settings…
Declaring files to be backed up…
Backup script completed for zeronet. (YunoHost will then actually copy those files to the archive).
Creating a backup archive from the collected files…
The archive will contain about 40.5GB of data.

and that’s it. no success message and no error message.

Hello, if the backup job is a bit long, it is possible that your browser “looses” connexion to the web Interface.

Do you see the archive of the backup being created under /home/yunohost.backup/archives ?

What happens if you try to backup yunohost from the command-line ?

Good luck with this :slight_smile:

Hello there, so I’m just trying now to backup using the command line will let you know how it goes! the archive seemed to be created, or at least 2gb of it was there, maybe I should have left it to continue creating, though not sure if that would have worked, lets see how the command line goes.

so I think I’ve got to the bottom of it.

I think the backup is failing due to there not being enough memory, although I believe I have 12 cpu cores and 24 gb memory! though mastodon is pretty heavy on the instance im running. I think I need to somehow stop mastodon, so the backup can run without mastodon hogging the memory etc. this is the log from the command line. copied and pasted from puTTY so sorry if its not formatted properly. any ideas on how to stop other yunohost services running so I can run the backup?

https://paste.yunohost.org/ticimovumo.vbs

so, ive managed to stop a few services related to mastodon and my other apps in services, presumably they will all just restart when I restart the server, and the backup is ticking away, fingers and toes crossed!

so, backup still crashed. restarted server, trying to stop services again, but I think by the time I’m getting to the admin, tools, services, page, everythings loaded and it then runs sluggishly meaning that by the time I’ve stopped the relevant services, lots of memory etc is still used. is there a command to stop all none essential services from the cli?

unless you are running a thousand users mastodon instance, and Yunohost’s aim isn’t really hosting big servers (although I have never seen it failed), you have way enough memory and CPU power to perform a backup.
I use yunohost on 10 year old laptops, on Raspberry Pi-s, on NUC mini pcs, and it still manages to have enough computing power to create backups.

You should investigate on which process consumes all your cpu / memory.

if you use the command ’top’ in the console, you should see which are “ballooning” your memory.

I believe you shouldn’t have to stop the processes, try restarting the services if needed, but if 24Gb Memory isn’t enough, I believe there is something wrong.

edit: through your log, it does still looks like a filesystem running out of space,

Could you post the result of

sudo df -h

please ?
Even with a 500Gb hard drive, you could be misconfigured (for instance a LVM Volume or DiskPartitionning not using all the available space).

hello there, thank you for all the info. seems this server from tna hosting isnt all its meant to be then if i should be able to run a backup fine! $80 a year, i thought it was such a great deal. maybe not! so trying another backup after stopping services in the web interface. if this fails I’ll run the command you suggested and send you over the result. thank you so much for all your help

so the backup is running now and the memory usage is slowly creaping up, currently nearly 11gb. i think I know why, the server has an HDD, rather than an SSD, so I think the backup is writing to the server faster than the server can handle so its being stored in ram until its writing to the hard drive, so lets see if the ram hits nearly 24 gb and if the backup fails if so i think the backup isnt waiting for the hard drive to take enough data from the ram and by doing that crashing the ram then failing?

so, here is the monster log of:
backup, failed.
and both commands you suggested running.
seems that once it got to 11gb ram it crashed, im going to message them about that as the server originally had 12 gb, i asked to be upgraded to 24 gb, which they did and it shows in the panel, but maybe somethings kicking me out at 11 for some reason.

https://paste.yunohost.org/biwowajani.vbs

Mokay so there’s definitely a stacktrace related to the missing /usr/share/yunohost/config_global.toml which for some reason disappeared on your server …

So let’s run apt install yunohost --reinstall (bear with me, this won’t reinstall like “everything”, it should just recreate the base file from YunoHost)

and then confirm that ls -l /usr/share/yunohost/config_global.toml doesn’t crash

Hello Aleks, so, done that and here is the log. hope this helps?

https://paste.yunohost.org/ojacomuwaz.vbs

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