I have a urbackup server and urbackup client on the same local network. Both the server and client are running on headless linux systems.
I have successfully performed a file-based backup of all my data. I have verified the backups to be valid, holding the correct data. I am now running a restore operation to make sure it works, before I get rid of my live data.
To simplify things, I’m testing the restore of 1 file. (my actual backup holds many more files and directories)
I’m initiating a restore via the server Web UI.
However, I’m receiving a (code: 2) error which is preventing the restore from completing.
The location I’m restoring to is empty, with zero folders or files. Just like a disaster recovery situation.
I’ve noticed, if I pre-create the restore directory, (in the below case: “/media/3TBinternalMount/pydio_storage/pydiomain/jared_media/organized_photos/2003/Sep/14/”) in the location I’m restoring to the file restore completes with no problem. However, when I try to restore a file from the back up, which exists in a directory not yet created in the storage being used for restore, then I get the aforementioned error code.
I think there is some silent error being thrown somewhere when a directory is attempting to be created on restore. As a result I’m having trouble figuring out what to do to fix this issue.
Here are the logs of the issue occurring.
What do I need to do to enable the client to be able to create the necessary directories during a restore operation?
I’ve enabled debug verbosity on the client log and here’s what is shown there:
2020-03-07 18:27:16: Starting restore... 2020-03-07 18:27:16: rc=0 hasError=true state=3 2020-03-07 18:27:16: ClientService cmd: #IjdrMsnzbcerX7X12UT3Z#1CHANNEL capa=36863&token=Xn1jKwWLU2p0px0L1KTS&restore_version=1&virtual_client= 2020-03-07 18:27:16: New channel: Number of Channels: 1 2020-03-07 18:27:16: rc=0 hasError=true state=0 2020-03-07 18:27:16: ClientService cmd: #IjdrMsnzbcerX7X12UT3Z#1CHANNEL capa=36863&token=Xn1jKwWLU2p0px0L1KTS&restore_version=1&virtual_client= 2020-03-07 18:27:16: New channel: Number of Channels: 1 2020-03-07 18:27:16: Loading file list... 2020-03-07 18:27:16: Flushing FileClient... 2020-03-07 18:27:16: Calculating download size... 2020-03-07 18:27:16: ClientService cmd: #IjdrMsnzbcerX7X12UT3Z#1CHANNEL capa=36863&token=Xn1jKwWLU2p0px0L1KTS&restore_version=1&virtual_client= 2020-03-07 18:27:16: New channel: Number of Channels: 1 2020-03-07 18:27:16: Flushing FileClient... 2020-03-07 18:27:17: Downloading necessary file data... 2020-03-07 18:27:17: Internet mode not enabled 2020-03-07 18:27:17: ClientService cmd: #IjdrMsnzbcerX7X12UT3Z#1CHANNEL capa=36863&token=Xn1jKwWLU2p0px0L1KTS&restore_version=1&virtual_client= 2020-03-07 18:27:17: New channel: Number of Channels: 1 2020-03-07 18:27:17: Restoring file "/media/3TBinternalMount/pydio_storage/pydiomain/jared_media/organized_photos/2003/Sep/14/2003-09-14_09-27-31-img_7788.jpg"... **2020-03-07 18:27:17: ERROR: Cannot open "/media/3TBinternalMount/pydio_storage/pydiomain/jared_media/organized_photos/2003/Sep/14/2003-09-14_09-27-31-img_7788.jpg" for writing. No such file or directory (code: 2)** 2020-03-07 18:27:17: ERROR: Error while downloading files during restore 2020-03-07 18:27:17: Restore failed. 2020-03-07 18:27:17: Server timeout (2) in FileClient 2020-03-07 18:27:17: ClientService cmd: #IjdrMsnzbcerX7X12UT3Z#1CHANNEL capa=36863&token=Xn1jKwWLU2p0px0L1KTS&restore_version=1&virtual_client= 2020-03-07 18:27:17: New channel: Number of Channels: 1 2020-03-07 18:27:17: Reconnected successfully, 2020-03-07 18:27:17: Flushing FileClient... 2020-03-07 18:28:17: ClientService cmd: PONG 2020-03-07 18:28:43: Internet mode not enabled
The Server log shows the following:
2020-03-07 10:27:16: Starting restore of path “backup/unencryptedBackups/AllPhotos/organized_photos/2003/Sep/14/2003-09-14_09-27-31-img_7788.jpg”…
2020-03-07 10:27:16: Starting restore…
2020-03-07 10:27:16: Loading file list…
2020-03-07 10:27:16: Calculating download size…
2020-03-07 10:27:17: Downloading necessary file data…
2020-03-07 10:27:17: ERROR: Cannot open “/media/3TBinternalMount/pydio_storage/pydiomain/jared_media/organized_photos/2003/Sep/14/2003-09-14_09-27-31-img_7788.jpg” for writing. No such file or directory (code: 2)
2020-03-07 10:27:17: ERROR: Error while downloading files during restore
2020-03-07 10:27:17: Restore failed.
2020-03-07 10:29:17: FileSrv: Sending script urbackup/FILE_METADATA|vjfkerMwD3povwClteZm56ABb not finished yet
BTW: This is seriously a fantastic backup solution. I continue to enjoy using it.
Many thanks and please help.