Restore failed

Hi,
I am trying to transfer osmc from 8gb sdcard to 32gb card. I backed up - using osmc. Installed osmc on new card. Restore backup. Message: some items failed to restore see log. Can you tell me where I’d find this log?
On reboot live tv (tvheadend) not working. Get “pvr manager starting up 0%” and it stays there. Any help greatly appreciated.

I don’t think OSMC’s backup copies the tvh configuration (in ~/.hts). Try copying that directory across to the new card.

And I assume you reinstalled tvh from the App Store?

Didn’t know i had to reinstall tvheadend. Assumed osmc did full backup.

Why would backup include 3rd party addons but not stuff from its own appstore?

tvh is not an addon. It’s a separate program accessed via the HTS addon.

Because there’s no guarantee at least at this time that the device you are restoring on can run the apps it did on a different device

Sam, can’t see the logic there. Ideally, a backup is done so that I can restore my system to exactly the same state it was in before, for instance, a crash. If i use it on a different device, that’s my problem, but as it stands, I will always have to reinstall tvheadend and configure the whole thing again even on the same device. About as much hassle as a clean install imo.

Also, rpi codec licence data was not restored. Is that deliberate?

The logic is simple.

If someone is migrating from a Pi1 and moves to a Pi 2, they are moving to a completely different ARM architecture. They are also moving to different hardware which may have fewer or different limitations.

If we backed up Apps and restored then, there’d be no guarantee that they work, but they would show as installed. This wouldn’t really solve anything and would surely be more confusing for users.

A backup doesn’t include TVHeadend, but it will backup TVHeadend settings. Reinstallation should be trivial.

Pi Codec settings are stored in the Pi once they have been entered once. You never need to add them again, regardless of which OS you choose to run on your device in the future

If only it was that simple. Users would repeatedly post and say the backup option is broken.

Sam, I see where you’re coming from and understand you’re probably going to be hassled either way. We simply disagree about the purpose of a backup. For me, a backup and restore should leave the system exactly as it was before the backup. A migration tool is a different beast.
From my brief look at it it seems tvh needs to be reconfigured, muxes identified, channels selected and so on, but maybe I’m wrong.
The pi codec did not show in the config file (on the gui) but that might be a different matter.
As always, I appreciate the work you do to provide this great os and the support you provide.

This isn’t possible to do in-situ. If you want a full, 1:1 backup, then backup the SD card at the block level.

That shouldn’t be the case.

Running vcgencmd to confirm your codecs will show they are still active. They don’t need to be in config.txt anymore.

FWIW backups has worked for me, except for the time the OS decided it was a goot time to bork the external USB disk (exfat). So my recommendation is: Backup to an external USB disk (disk or stick), then copy te files somewhere else.

The initial question has not been answered yet, so I choose to revive the topic:
Where is the log?
I did restore a backup a few minutes ago, it has thrown the same message “some files could not be restored, see log”
@sam_nazarko

We would need to see a log via My OSMC.

I have uploaded it: http://paste.osmc.tv/kenafebana (now with kodi.log @sam_nazarko :nerd_face: )

osmc@osmc:~/.kodi/temp$ grep “OSMC BACKUP” kodi.log | grep -v “attempting to restore”
16:44:03.344 T:3874640640 DEBUG: OSMC BACKUP: : - osmc_backup INIT
16:44:03.708 T:3874640640 DEBUG: OSMC BACKUP: : - Trying to backup guisettings, running xbmc.saveSettings
16:44:04.093 T:3874640640 DEBUG: OSMC BACKUP: : - Contents of remote location:
16:44:04.095 T:3874640640 DEBUG: OSMC BACKUP: : - tarball list from location:
16:44:08.398 T:3874640640 DEBUG: OSMC BACKUP: : - User selected backup file: /media/5B84-69C5/OSMCBACKUP_2018_10_24_21_00_13.tar.gz
16:44:43.517 T:3874640640 DEBUG: OSMC BACKUP: : - User has chosen to restore all items
16:44:45.577 T:3874640640 DEBUG: OSMC BACKUP: : - User has chosen to overwrite existing files.
16:45:21.203 T:3874640640 DEBUG: OSMC BACKUP: : - Extraction of userdata/fstab failed
16:45:21.204 T:3874640640 DEBUG: OSMC BACKUP: : - NameError
16:45:21.204 T:3874640640 DEBUG: OSMC BACKUP: : - (“global name ‘uniquify’ is not defined”,)
16:45:21.205 T:3874640640 DEBUG: OSMC BACKUP: : - Traceback (most recent call last):
16:45:21.205 T:3874640640 DEBUG: OSMC BACKUP: : - Deleting temp_copy failed. Dont worry, it might not exist.

So the simple answer to starting question would be: OSMC Backup is a kodi addon, so you need to enable debug logging to see its logentries within kodi.log

@sam_nazarko I cannot see any real errors in the log. Do you?

There is no Kodi log.

I don’t see an attempt to restore a backup in your log.
You may also wish to enable debug logging.

Please show the output from running ls -la ~/.kodi and ls -la ~/.kodi/userdata

1 Like

oh, shame on me. I’m so sorry that I a missed that line (“… failed …”)

osmc@osmc:~$ ls -la ~/.kodi
insgesamt 28
drwxr-xr-x  7 osmc osmc 4096 Sep  8 22:32 .
drwxr-xr-x 10 osmc osmc 4096 Nov 14 17:26 ..
drwxr-xr-x 48 osmc osmc 4096 Nov 14 17:03 addons
drwxr-xr-x  2 osmc osmc 4096 Sep  8 22:32 media
drwxr-xr-x  2 osmc osmc 4096 Sep  8 22:32 system
drwxr-xr-x  6 osmc osmc 4096 Nov 14 17:03 temp
drwxr-xr-x  9 osmc osmc 4096 Nov 14 17:03 userdata
osmc@osmc:~$ ls -la ~/.kodi/userdata
insgesamt 88
drwxr-xr-x  9 osmc osmc  4096 Nov 14 17:03 .
drwxr-xr-x  7 osmc osmc  4096 Sep  8 22:32 ..
drwxr-xr-x 18 osmc osmc  4096 Okt 18 23:31 addon_data
-rw-r--r--  1 osmc osmc   108 Okt 24 20:58 advancedsettings.xml
drwxr-xr-x  3 osmc osmc  4096 Nov 14 20:00 Database
-rw-r--r--  1 osmc osmc   159 Okt 24 21:03 fstab
-rw-r--r--  1 osmc osmc 29246 Nov 14 17:43 guisettings.xml
drwxr-xr-x  2 osmc osmc  4096 Sep  8 22:32 keymaps
drwxr-xr-x  2 osmc osmc  4096 Sep  8 22:32 library
drwxr-xr-x  2 osmc osmc  4096 Sep  8 22:32 peripheral_data
drwxr-xr-x  5 osmc osmc  4096 Sep  8 22:32 playlists
-rw-r--r--  1 osmc osmc   923 Nov 14 17:43 profiles.xml
-rw-r--r--  1 osmc osmc   389 Sep  8 22:32 RssFeeds.xml
-rw-r--r--  1 osmc osmc   948 Okt  1 23:27 sources.xml
drwxr-xr-x 19 osmc osmc  4096 Sep  8 22:32 Thumbnails

the failed file from the backup contains only comments. The content is the same like in my running osmc:

osmc@osmc:~$ cat ~/.kodi/userdata/fstab 
# rootfs is not mounted in fstab as we do it via initramfs. Uncomment for remount (slower boot)
#/dev/vero-nand/root  /    ext4      defaults,noatime    0   0

Looks like my osmc has been restored completely, I assume no other files were not be restored. Sorry for wasting your time reading my logs. :innocent: