Hardware: AMD64 YunoHost version: 4.3.6.3 (stable). I have access to my server : Yes Are you in a special context or did you perform some particular tweaking on your YunoHost instance ? : yes If yes, please explain: it’s behind a VPN exactly like: Homemade WireGuard VPN on a VPS server
Description:
I use restic for local backups on sdb but I found that it takes up the disk space of sda, why does it do this, and can I prevent this from happening?
I had a similar problem years ago (not with restic) and it was due to a default configuration and an error on my side.
What I remember is that even if you use a rpecific backup app, the default YunoHost batkup process is used first, then this backup is pushed to the app.
This backup contains many things, some generated files (database export for example), and also symlinks to real files (to avoid too much work).
This backup is, if I remember, in /home/yunohost.backup
There are 3 folders :
archives : where the default process puts the final archives, can be moved to another disk with symlink (maybe not the best idea, but it’s what I did)
premigration : no idea
tmp : I had huqe problems with this one when I first tried to move /home/yunohost.backup to another drive, so even if it temporary gets bigger, it should be emptied at the end of the process.
So in conclusion :
Wait for the end of the backup to check the used space.
Ajways remember that backup use space during the process, even if awesome work have been made to limit the used tmp space.
If lisk space is still used on the wnong disk, find where (and check if a backup on the right disk have been made)
Okay I would love to wait, but it makes the server useless and shutdown processes to save on resources, then mail fails cause there is no disk space left.
So making symlinks for those 3 folders to somewhere on the backup drive?
What I saw was that temp folders and files were created on the sdb drive. So how about that?
From what I remember, the tmp folder should NOT be moved (but I had this problem years ago, no idea of if it is still existing).
The system created stuff inside, and was not able to remove it, which failed each other backup.
So the backup process was using 100% of your main drive ?
Can you give some details about the disk size, space usually used, folder that fulled your drive, and stuff that can help understand ?
holy moly. you are using restic to backup the whole disk? i can see why the disk might get full. i am not sure how much data is on your drive but your drive must not be big enough for the swap/cache files it needs. if you are really set on doing this sort of backup, i would recommend checking out the restic forums. somebody might be able to help you there.
also, i am not sure restic is the right tool for this type of backup. it seems like you need a snapshot type of tool. you might have a corrupt backup if files change while restic is backing them up. i’m not to familiar with full system snapshots but maybe timeshift could work?
Or maybe use an app which use the YunoHost backups mechanisms, usually most of the system do not need to be backuped, only apps data and conf (and user files/mails).
Almost 1 TiB, since I’ve got a very huge website. But the drive is also 1 TiB both are actually the main drive and the backup drive.
Ah that can be a issue indeed, timeshift sounds also legit.
Now I do have that other tool (forgot its name) to clone the drive, but that’s an offline tool, therefore I need to boot to that system to do a backup, which means that the server would be offline. The best solution would be a snapshot based back up for which I do not have to take the server ‘offline’.
So i thought restic would be great but not, then which are better to use? Timeshift and?
probably need to do a deep-dive on the internet. check out rsync, rsnapshot or rclone.
for me, i just use restic to backup my nextcloud data directory, and my home directory. if i lose my yunohost server, i would reinstall yunohost and just send my data back into my nextcloud.
I have absolutely no idea, and it will depends on the apps.
That’s why I use YunoHost’s backup mechanisms and backup apps using them.
On my side I’m using borg backup and in the conf panel I can choose “server conf”, “user data/mail” and/or “apps” (can be “all”, a list to include or a list to exclude).
And I do not care what to backup, it’s all determined by the apps mainteners
But my issue is that I cannot back up the ‘big’ site using the YH mechanism. Unless there is a way to change the backup folder to the other drive maybe? Then i don’t have to use restic at all…
One more thing… Can this also be done for all the other backup folders or for /home/yunohost.backup as a whole?
And also;
Info: Creating a backup archive from the collected files...
Info: The archive will contain about 452.0GiB of data.
Info: The operation 'Create a backup archive' could not be completed. Please share the full log of this operation using the command 'yunohost log share 20220809-182949-backup_create' to get help
Error: Not enough free space on '/home/yunohost.backup/archives
2022-08-09 20:31:44,840: INFO - The archive will contain about 452.0GiB of data.
2022-08-09 20:31:44,840: DEBUG - Creating the backup TAR archive...
2022-08-09 20:31:44,840: DEBUG - Not enough space at /home/yunohost.backup/archives (free: 181394104320 / needed: 485303156881)
Says you only have 181 GB free but it needs 485 GB.