Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

After switch to opendal, existing Hetzner storagebox repository can't backup anymore #1100

Closed
devhell opened this issue Mar 12, 2024 · 3 comments
Labels
S-triage Status: Waiting for a maintainer to triage this issue/PR

Comments

@devhell
Copy link

devhell commented Mar 12, 2024

Hi,

Love that the backend is not relying on rclone now, but it appears that my existing Hetzner storagebox repo can't be backed up to any more.

The backup is called as follows: rustic -P machine backup

Config file:

repository]
repository = "opendal:sftp"
password-file = "XXXXXXX"

[repository.options]
endpoint = "ssh://XXXXXX.your-storagebox.de"
user = "XXXXXXX"
key = "~/.ssh/XXXXXXX"
root = "/rustic/backup"

[backup]
exclude-if-present = [".nobackup", "CACHEDIR.TAG"]
one-file-system = true

[[backup.sources]]
source = "/home/dev/temp/storagebox"

Output:

[INFO] using config /home/dev/.config/rustic/machine.toml
[INFO] session_task; session=Session(ProcessImpl(Session { tempdir: Some(TempDir { path: "/home/dev/.local/state/.ssh-connection4aCS1f" }), ctl: "/home/dev/.local/state/.ssh-connection4aCS1f/master", master_log: Some("/home/dev/.local/state/.ssh-connection4aCS1f/log") }))
[INFO] Connecting to sftp subsystem, session = Session(ProcessImpl(Session { tempdir: Some(TempDir { path: "/home/dev/.local/state/.ssh-connection4aCS1f" }), ctl: "/home/dev/.local/state/.ssh-connection4aCS1f/master", master_log: Some("/home/dev/.local/state/.ssh-connection4aCS1f/log") }))
[INFO] Connection to sftp subsystem established, session = Session(ProcessImpl(Session { tempdir: Some(TempDir { path: "/home/dev/.local/state/.ssh-connection4aCS1f" }), ctl: "/home/dev/.local/state/.ssh-connection4aCS1f/master", master_log: Some("/home/dev/.local/state/.ssh-connection4aCS1f/log") }))
[INFO] flush_task; write_end_buffer_size=100 flush_interval=500µs
[INFO] read_task; read_end_buffer_size=1024
[INFO] repository opendal:: password is correct.
[INFO] using cache at /home/dev/.cache/rustic/472f44f2c9250e7daa1f2e9221b0f3fd7751e6eab6d0c236902535fa317ffbea
[00:00:00] reading index...               ████████████████████████████████████████          6/6                                                           [INFO] using all backup sources from config file.
[INFO] merging source="/home/dev/temp/storagebox" section from config file
[00:00:00] getting latest snapshot...     ████████████████████████████████████████         46/46                                                          [INFO] using parent b5c7b1e3
[INFO] starting to backup "/home/dev/temp/storagebox"...
[00:00:04] backing up...                  ███████████████████████████████████████░ 120.61 GiB/123.06 GiB 22.66 GiB/s  (ETA 0s)                            [WARN] service=sftp operation=write path=snapshots/63883030ce8df0a9c9b5ec09565a5701cb9af3a19e218dc7e8ff708aac12018a -> NotFound (persistent) at write, context: { service: sftp, path: snapshots/63883030ce8df0a9c9b5ec09565a5701cb9af3a19e218dc7e8ff708aac12018a } => sftp error, source: Sftp server reported error kind NoSuchFile, msg: Err Message: No such file, Language Tag: en-US
error: NotFound (persistent) at write, context: { service: sftp, path: snapshots/63883030ce8df0a9c9b5ec09565a5701cb9af3a19e218dc7e8ff708aac12018a } => sftp error, source: Sftp server reported error kind NoSuchFile, msg: Err Message: No such file, Language Tag: en-US
[INFO] Requesting graceful shutdown of flush_task from read_task, shared_data = 0x55d1431fd670
[INFO] flush_task graceful shutdown, shared_data = 0x55d1431fd670

Every time I run the backup command, the snapshot ID it says it can't find, changes.

I ran rustic -P machine check which came back fine. I've also tried rustic -P machine repair index and rustic -P machine repair snapshots, both of which don't flag anything. Running the backup again simply results in a random snapshot ID apparently not being found.

System is NixOS Unstable, rustic version is 0.7.0.

@github-actions github-actions bot added the S-triage Status: Waiting for a maintainer to triage this issue/PR label Mar 12, 2024
@aawsome
Copy link
Member

aawsome commented Mar 12, 2024

It seems the write command of the snapshotfile generated by that backup just failed. Which is a bit weird as obviously reading was successful.

Just guessing: From https://github.com/rustic-rs/rustic/blob/main/config/services/sftp_hetzner_sbox.toml I see that other users use port 23 to access the storage box. Could it be that using the default port 22 you just have read-only access?

@devhell
Copy link
Author

devhell commented Mar 12, 2024

It seems the write command of the snapshotfile generated by that backup just failed. Which is a bit weird as obviously reading was successful.

Just guessing: From https://github.com/rustic-rs/rustic/blob/main/config/services/sftp_hetzner_sbox.toml I see that other users use port 23 to access the storage box. Could it be that using the default port 22 you just have read-only access?

Storagebox allows for both port 22 and 23 to be used, see here: https://docs.hetzner.com/robot/storage-box/backup-space-ssh-keys

I can't use 23 because of how my work network is configured. I've used rustic via rclone backend on port 22 just fine in the past.

I'll try on a different machine that is on a less restricted network, and change to port 22 just to be sure, and I'll report back.

@simonsan
Copy link
Contributor

https://docs.hetzner.com/robot/storage-box/access/access-ssh-rsync-borg

The Storage Box provides an extended SSH service on port 23. With this service, you can use rsync, BorgBackup, and some additional command line tools.
It is possible to get interactive SSH access, but this access is limited. It is not possible to have interactive access via port 22, but it is possible via port 23. There is no full shell. For example, it is not possible to use pipes or redirects. It is also not possible to execute uploaded scripts.

So please use port 23. ;-)

@rustic-rs rustic-rs locked and limited conversation to collaborators Mar 12, 2024
@simonsan simonsan converted this issue into discussion #1102 Mar 12, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
S-triage Status: Waiting for a maintainer to triage this issue/PR
Projects
None yet
Development

No branches or pull requests

3 participants