• The forum software that supports hummy.tv will be upgraded to XenForo 2.3 on Wednesday the 20th of November 2024 starting at 7pm

    There will be some periods where the forum is unavailable, please bear with us. More details can be found in the upgrade thread.

TV diary log location please and various

sine24

Member
Is it possible to add older entries to a newly created TVdiary log? If yes how do you go about it? Would it behave just like the original, be searchable, etc?
 
Is it possible to add older entries to a newly created TVdiary log? If yes how do you go about it? Would it behave just like the original, be searchable, etc?
Sorry, no. It creates entries copying from the EPG, so it needs to be live. It's not good dealing with manual recordings not from the EPG either.
 
The older entries were also created live by copying from the EPG. Could those logs not be copied from the old CF drive to the new drive?
 
The older entries were also created live by copying from the EPG. Could those logs not be copied from the old CF drive to the new drive?
Ah, I misunderstood. You have an existing old TVDiary DB.
I've copied over the existing /mod/etc/tvdiary.db to restore old contents before.
You'd lose the newer log entries. I've only done it when re-setting the installation, and so I haven't worried about losing a few hours of new logs.
If you want to retain the old details and the new details, then you could do it using the sqlite3 command line tool.
I can't say exactly how, as I only used it occasionally, and a long time ago.
#1 you want to copy tvdiary.db to a working copy, otherwise you'll have the background process accessing the file at the same time, and possibly getting into a horrible mess.
Using it, I'm not sure if you can do merges of two DB files. Most likely you'll need to export SQL from one file and import into the other, to merge.
#VagueHandWaving
Once you've merged into the copied DB, copy it back to overwrite the live tvdiary.db file.
Sorry I can't give more detail, I only used sqlite3 to correct corruption, compact the data, and export to SQL text for backing up.
 
You need to learn some basic Linux. The USB stick will be available in the folder structure under /media, possibly as "drive1" (but that depends).

Your computer will only be available if you have a folder mounted as a virtual USB drive using network-shares-automount.

Alternatively, with the CF betaftpd package installed and the standard FTP server turned off, you can access the relevant file from the PC by FTP (FTP username = "root", password = "humaxftp").
 
You need to learn some basic Linux. The USB stick will be available in the folder structure under /media, possibly as "drive1" (but that depends).

Your computer will only be available if you have a folder mounted as a virtual USB drive using network-shares-automount.

Alternatively, with the CF betaftpd package installed and the standard FTP server turned off, you can access the relevant file from the PC by FTP (FTP username = "root", password = "humaxftp").
Never let it be known that I don't want to learn something new.

What's the command for listing all the drives available to the Linux install on the box?

Assuming it can see the old drive in the usb port as you said as drive1 would it be able to see the /mod/etc/tvdiary.db or do I have to reinstall the old drive in the box to access that database?
 
What's the command for listing all the drives available to the Linux install on the box?
That's not how Linux works. Assuming a USB drive is mounted (on the HDR-FOX it will auto-mount), all storage is available as a tree under root (/). Take a look in /media - you'll get the idea.
 
Assuming it can see the old drive in the usb port as you said as drive1 would it be able to see the /mod/etc/tvdiary.db or do I have to reinstall the old drive in the box to access that database?

Do you know the answer to this?
 
I thought I explained: with the old drive mounted as a USB device, the file structures on the old drive will appear under /media (so the answer is "yes")

On the command line:
  • pwd (print working directory) tells you what the current directory is;

  • ls (list) tells you what (non-hidden) files and folders exist in the current directory;

  • ls <path> tells you what (non-hidden) files and folders exist in director <path>;

  • cd <path> (change directory) changes the working directory to <path>;

  • etc. Google "linux commands" for anything else you might want (but keep to simple stuff - the Humax Linux is not well endowed).
 
The closest to "the command for listing all the drives available to the Linux install on the box" is mount | grep -E "^/dev/sd", ie filter the list of mounted filesystems to show only SATA disks. When you read an output line like
Code:
/dev/sdb2 on /mnt/hd2 type ext3 (rw,data=ordered)
(ie "device" "mounted on" "directory" "filesystem type" "with mount options") that's an invitation to ls -l /mnt/hd2 to see what's in the root of the filesystem that's mounted on the directory.
 
Hmm... here's a thought: I'm not sure whether all the partitions on the external HDD will be automatically mounted. It could be they might need mounting manually. I might try it myself, but it won't be today.
 
I thought I explained: with the old drive mounted as a USB device, the file structures on the old drive will appear under /media (so the answer is "yes")

On the command line:
  • pwd (print working directory) tells you what the current directory is;

  • ls (list) tells you what (non-hidden) files and folders exist in the current directory;

  • ls <path> tells you what (non-hidden) files and folders exist in director <path>;

  • cd <path> (change directory) changes the working directory to <path>;

  • etc. Google "linux commands" for anything else you might want (but keep to simple stuff - the Humax Linux is not well endowed).

All of these basic commands can easily be found and explained on YouTube.
 
If I was to copy the current etc folder to another say: /mod/webif so I can have a backup in case overwriting goes tits up? Would that be ok?
 
Yep. The only thing you have to watch out for is parts of the file system that are either temporary (vanish and get recreated at boot), or read-only (stored in Flash).

The easiest way to back up the tvdiary.db file is simply ("cp" = copy; the choice of ".bak" is arbitrary but mnemonic):

Code:
cp /mod/etc/tvdiary.db /mod/etc/tvdiary.bak

...and then if you want to restore it:

Code:
cp /mod/etc/tvdiary.bak /mod/etc/tvdiary.db

...and when you are sure you don't need it any more ("rm" = remove, ie delete):

Code:
rm /mod/etc/tvdiary.bak
 
Success. Managed to copy the old one to the new disk. Thank you for the pointing in the right direction by martxw , BH and df.

Have tried a python exec for merging, managed to merge various tables from the new to the old db but it must be the merging of the ID table that messes up the resulting db. There's duplicates.
 

Attachments

  • Untitled.jpg
    Untitled.jpg
    55.2 KB · Views: 5
Back
Top