Open bilogic opened 1 year ago
Is there a reason why you're skipping the pre-checks? Otherwise the addon would stop immediately if the target directory is not found instead of writing to the root.
I think I could change that to at least try to create the target directory if it does not exist. However, I would only add that to the pre-checks as this is the place where the configuration is checked.
Thanks for getting back.
Just checked, I'm not skipping the pre-checks, it is disabled. I'm on 5.2.0
So then this means that the target directory exists when you start the addon, but somewhere between startup and the backup you delete the directory. Actually that's not really how this addon should be used.
Is it an option for you to configure a second share with the full path to your desired folder and leave target_dir empty?
Ok sure, I take it you want to be coding to a strict set of mechanical logic.
In that case, why copy backup to the root when target no longer exist? I mean, strictly speaking, it should just fail right?
I feel that samba is a network resource and can become unavailable due to a myriad of reasons. I guess the question is, what should the software do when target is unavailable, and when resource itself is unavailable.
The reason I have to wipe the storage when it rotates monthly is to ensure it always starts from a clean slate. The delta copying software I use sometimes gets confused about the state of the data if I don't wipe it.
If I may ask, what is the concern to check and create the target_dir before each backup? I could create a 2nd share, but I would still have to manually re-create the folder. And in this case, I would have to save this path in several parts of my system, not just Samba Backup
alone.
In that case, why copy backup to the root when target no longer exist? I mean, strictly speaking, it should just fail right?
That's the behavior of smbclient. I wasn't aware of that to be honest.
If I may ask, what is the concern to check and create the target_dir before each backup?
I'll think about it. Probably you're right and I can adapt the current functionality.
That's the behavior of smbclient. I wasn't aware of that to be honest.
Thanks, that is new to me too... strange why they did it this way. I'm digressing, but imagine cp bigfile /non-existent/path/
and it goes to /
.
Thank you for the consideration!
Can we have an option to create the target folder if it doesn't already exists?
The thing is, I rotate my backup storage and at each rotation, the backup storage is wiped clean. When the target folder doesn't exists, this add on writes to the root of the share instead.
Thank you!