Closed hendrikma closed 2 years ago
Thank you for opening this issue
I am not very into python nor HA-Dev but i think there is an escaping-error in this line:
ssh remote "mv "${REMOTE_DIRECTORY}"/${slug}.tar "${REMOTE_DIRECTORY}"/\"${name}\".tar"
I am no expert either, but I think you are right something is indeed wrong with my regex, despite me being unable to recreate your bug.
I ran that line through a regex debugger and sure enough it found some issues
I am thinking this will be the fix:
ssh remote "mv "${REMOTE_DIRECTORY}"\/\${slug}.tar "${REMOTE_DIRECTORY}"\/\"${name}\".tar"
I will run some tests and try to have a fix out very soon
Thank you again for pointing this out, I don't think I would have been able to find this on my own
Nope I was wrong, that's not correct either
Thanks to @DubhAd (aka Tinkerer on Discord) I believe I have solved this issue, Thanks for pointing it out, I will be releasing 2021.9.0 soon, I hope to hear back to see if it solves your issue
I just noticed you have a space at the beginning of your filename, so if updating to 2021.9.0
doesn't fix it I would suggest removing that
I want to thank you very much for your quick response and related update last month.
Unfortunately, I still have this problem:
[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 00-banner.sh: executing...
-----------------------------------------------------------
Add-on: Remote Backup
Automatically create and backup HA snapshots using SCP
-----------------------------------------------------------
Add-on version: 2021.9.0
You are running the latest version of this add-on.
System: Home Assistant OS 6.4 (aarch64 / raspberrypi4-64)
Home Assistant Core: 2021.9.7
Home Assistant Supervisor: 2021.09.6
-----------------------------------------------------------
Please, share the above information when looking for help
or support in, e.g., GitHub, forums or the Discord chat.
-----------------------------------------------------------
[cont-init.d] 00-banner.sh: exited 0.
[cont-init.d] 01-log-level.sh: executing...
[cont-init.d] 01-log-level.sh: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
Adding SSH key
Creating local backup: "hassio-backup- 2021-10-04 03-00"
Backup created: 8225ace8
Copying 8225ace8.tar to ~/backup_hassio on 192.168.178.5 using SCP
Warning: Permanently added '192.168.178.5' (ED25519) to the list of known hosts.
Renaming 8225ace8.tar to hassio-backup- 2021-10-04 03-00.tar
mv: cannot stat '~/backup_hassio/8225ace8.tar': No such file or directory
[cmd] /run.sh exited 1
[cont-finish.d] executing container finish scripts...
[cont-finish.d] 99-message.sh: executing...
-----------------------------------------------------------
Oops! Something went wrong.
We are so sorry, but something went terribly wrong when
starting or running this add-on.
Be sure to check the log above, line by line, for hints.
-----------------------------------------------------------
[cont-finish.d] 99-message.sh: exited 0.
[cont-finish.d] done.
[s6-finish] waiting for services.
[s6-finish] sending all processes the TERM signal.
The uploaded file is a tar archive with the name of the folder specified in the configuration:
backupmaster@Diskstation:~$ ls -l
-rw-r--r-- 1 backupmaster users 161699840 Oct 4 03:10 backup_hassio
I sincerely hope that I could once again help to fix the problem.
Many greetings Hendrik
Have you checked to make sure the directory exists and your SSH user has access to write files to it?
EDIT: I see you have done that, try using the absolute path in remote directory
Well,
IT WORKS!
:D Thanks a lot for your immediate answers!
Glad I could help... when in doubt use absolute paths
Hey folks,
i just installed your addon and it works fine, except one things:
I am not very into python nor HA-Dev but i think there is an escaping-error in this line:
ssh remote "mv "${REMOTE_DIRECTORY}"/${slug}.tar "${REMOTE_DIRECTORY}"/\"${name}\".tar"
Any suggestions on this?