thomasmauerer / hassio-addons

My collection of addons for Home Assistant
MIT License
458 stars 54 forks source link

Samba Backup not playing nice with native NAS function of HA #153

Open Kugelfang666 opened 1 year ago

Kugelfang666 commented 1 year ago

Hi all,

I used to have this add-on up and working for months. Ever since the native integration of remote locations for the backups was integrated into HA this integration does not work for me any longer.

I have a folder for the HA Backups on my NAS with two Subfolders

NAS-FOLDER --> Subfolder 1: Native_Backups --> Subfolder 2: Automatic_Backups

Subfolder 1 is mounted using the native network folder feature introduces with HA 2023-06 Subfolder 2 is the destination for this addon

When this add-on runs, I can see the backup being ending up in Subfolder 1 instead of Subfolder 2. Also I receive an Error in the logs:

[23-07-27 13:04:29] INFO: --------------------------------------------------- [23-07-27 13:04:29] INFO: Host/Share: 192.168.178.73/HomeAssistant [23-07-27 13:04:29] INFO: Target directory: Automatic_Backups [23-07-27 13:04:29] INFO: Keep local/remote: 0/10 [23-07-27 13:04:29] INFO: Trigger time: 13:06 [23-07-27 13:04:29] INFO: Trigger days: Mon Tue Wed Thu Fri Sat Sun [23-07-27 13:04:29] INFO: --------------------------------------------------- [23-07-27 13:04:30] INFO: Samba Backup started successfully [23-07-27 13:06:30] INFO: Backup running ... [23-07-27 13:06:30] INFO: Creating backup "Samba Backup 2023-07-27 13:06" [23-07-27 13:44:39] INFO: Copying backup 1c68865d (Samba_Backup_2023_07_27_13_06.tar) to share [23-07-27 13:44:39] WARNING: 1c68865d.tar does not exist [23-07-27 13:44:39] WARNING: Could not copy backup 1c68865d to share. Trying again ... [23-07-27 13:44:44] WARNING: 1c68865d.tar does not exist [23-07-27 13:44:54] INFO: Backup finished

screenshot

My suspicion is that this add-on called the backup function. since a remote folder is already setup the backup is created in the subfolder 1. Then somehow the copy from subfolder 1-->2 does not work

metroveinte commented 1 year ago

Hi all,

same problem here:

image

image

image

alsoszaa commented 1 year ago

Same thing here: [23-08-25 16:59:03] INFO: --------------------------------------------------- [23-08-25 16:59:03] INFO: Samba Backup started successfully [23-08-25 17:00:03] INFO: Backup running ... [23-08-25 17:00:04] INFO: Creating backup "Samba Backup 2023-08-25 17:00" [23-08-25 17:00:44] INFO: Copying backup bbacd1cd (Samba_Backup_2023_08_25_17_00.tar) to share [23-08-25 17:00:44] WARNING: bbacd1cd.tar does not exist [23-08-25 17:00:44] WARNING: Could not copy backup bbacd1cd to share. Trying again ... [23-08-25 17:00:49] WARNING: bbacd1cd.tar does not exist [23-08-25 17:00:59] INFO: Backup finished

hotchkj commented 1 year ago

Given the WARNING xxxxxxxx.tar does not exist and looking through the copy code, I would suspect the addon is assuming the backups are always on the data disk, and if they've been moved elsewhere, it has no idea where to transfer the files from.

I imagine some will argue that the new NAS HA functionality supersedes this addon, but given how important backups are, I'd much rather have both sets on a separate NAS, and I tend to trust stable addon code more than new HA functionality anyway.

Kugelfang666 commented 1 year ago

Thanks for investigating! To be honest the native NAS backup function of HA is nice, What's missing however is the automatic removal of all backups. That's a feature that makes this add-on so useful to me

carlhye commented 6 months ago

I get the same issue, anyone working on a fix?

MilesTEG1 commented 6 months ago

Same issue here since I set the default location for backup on a remote smb share (on my NAS).

carlhye commented 6 months ago

Same here.

I've unmounted the NFS backup folder and use the SMB share, then the add-on works great.

It would be nice to have this add-on work with the NFS folder for backups.

Love this add-on since it makes it possible to make backups without the cloud.

Would be great to have some of the retention rules from the Google drive backup add-on though.