Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Zero Size Backups #166

Open
majurgens opened this issue Nov 18, 2024 · 6 comments
Open

Zero Size Backups #166

majurgens opened this issue Nov 18, 2024 · 6 comments

Comments

@majurgens
Copy link

I have installed this addon. I have the latest version of Home Assistant running in a VM (2024.11)

It runs but always creates zero length files on the remote server. I have manually verified scp access is working.
I have looked in the debug log and I suspect that the problem is spaces in the file names (but not really sure).

Here is an extract of the debug log that seems relevant

debug1: Sending command: scp -v -t /export/shared/backups/ha/Automated backup 2024-11-16 05-00.tar
debug1: pledge: fork
debug1: client_input_channel_req: channel 0 rtype exit-status reply 0
debug1: client_input_channel_req: channel 0 rtype [email protected] reply 0
debug1: channel 0: free: client-session, nchannels 1
Transferred: sent 3356, received 3112 bytes, in 0.2 seconds
Bytes per second: sent 15945.0, received 14785.7
debug1: Exit status 1
scp: ambiguous target

Somehow this creates and empty file on the remote ssh server (where I need to escape or quote the spaces)

ls -l "/export/shared/backups/ha/Automated backup 2024-11-16 05-00.tar" 
-rw-r--r-- 1 ha ha 0 Nov 16 05:00 '/export/shared/backups/ha/Automated backup 2024-11-16 05-00.tar'

Rsync does not work either, maybe the same problem

Copy link

stale bot commented Jan 18, 2025

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Jan 18, 2025
@majurgens
Copy link
Author

Still a problem

@ikifar2012 ikifar2012 removed the stale label Jan 19, 2025
@ikifar2012
Copy link
Owner

Have you checked the FAQ?
https://addons.mathesonsteplock.ca/docs/addons/remote-backup/resources#why-is-sftpscp-not-working

If that is no help may I know what device you are trying to copy to?

@majurgens
Copy link
Author

majurgens commented Jan 20, 2025

None of that information seems relevant. The connection is good and the backup is created. It just cannot write it.
The biggest suspect is the error message "scp: ambiguous target" from the original post since there are spaces in the name.
The backup is being written to a Fedora Linux server. I have manually verified that the credentials work and that I can write files. In fact, if I remove the remotes directory or change its permissions to read-only the addon complains that it cannot write the backup

@majurgens
Copy link
Author

Can we perhaps remove the space between the prefix and date on this line?

https://github.com/ikifar2012/remote-backup-addon/blame/d999e4291ab437ab43ab59ffe77bcbe8dec078bc/remote-backup/run.sh#L53

I'd love to be able to modify it locally and test it but I have zero clue on how to do this in Homeassistant

@ikifar2012
Copy link
Owner

I might just do this, I it makes sense to do

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants