Auto-backup music files to external HD under Kodi 18.4
#1
Hello there!

I'm new to the forum as well as to the whole Kodi / Raspberry Pi thing. I own a Raspberry Pi 4 b, which I've installed Kodi on, that I want to use as media server.
I have connected an external HD where my whole music library (and some photos and movies) is stored on.

Now what I would like to do is connect a SECOND hard drive and get Kodi to automatically and periodically backup (or simply copy) my music files (and possibly other ones) from the first HD to the second one. Ideally, as an incremental backup.

Of course I have stumbled upon the Backup Add-On available in the repository, but it seems that only makes backups from the Kodi installiation/configuration and the meta-data, correct?

Is there a comfortable way to achieve a backup of certain files/folders using Kodi or the underlying OS?

My System:
Raspberry Pi 4 b
LibreELEC 9.1.502
Kodi 18.4

Cheers,

blibso
Reply
#2
Use rsync from the network-tools add-on, and schedule a cronjob.
Texture Cache Maintenance Utility: Preload your texture cache for optimal UI performance. Remotely manage media libraries. Purge unused artwork to free up space. Find missing media. Configurable QA check to highlight metadata issues. Aid in diagnosis of library and cache related problems.
Reply
#3
(2019-11-12, 18:22)Milhouse Wrote: Use rsync from the network-tools add-on, and schedule a cronjob.

I'm going to try that tomorrow, thank you for the quick answer!
Reply
#4
Well, I've looked into it, and it's going to take me a few days to implement due to lack of time, but it seems that rsync can do exactly what I want - so thanks again!
Reply
#5
So, I've tried to create a cron job for rsyn now and encountered a few problems, hope somebody can help me out here...

I connected to Libreelec via ssh using Putty. So far, so good.
I then tried to create a file with the cron command in /etc/cron.d/, which does not work because it tells me that it is a 'read-only file system'.

So I went another way and tried to add a cron job using the command crontab -e. That works partially.
The command I first added is the following:

25 16 * * * root rsync -avzP /var/media/Volume/Music /var/media/Backup/Music

to schedule an rsync command for 4.25pm every day, that copies my Music folder from my main storage, called Volume, to my backup storage, called backup.
Nothing happens.

I tried the crontab with a simple command, adding

25 16 * * * reboot

which works like a charm.

I also tested the rsync command by directly running it inside the command shell, which also works. So somehow there has to be something wrong in my combination of crontab + rsync...

Any help appreciated!

P.S.: Is there any kind of log or error output by the active cron jobs I can access for debugging? I've read that I can add a line saying 'MAILTO:root' to the crontab to send the command output to the root user's mail folder, but where do I even find that?

Cheers!
Reply
#6
Got it working, you have to replace 'rsync' in the crontab line with the full path to rsync: '/storage/.kodi/addons/virtual.network-tools/bin/rsync'
Reply
#7
Glad you got it working. Don't think mailto will work on LibreELEC as there's no sendmail/postfix installed by default and I don't think either is available from the repository.
Texture Cache Maintenance Utility: Preload your texture cache for optimal UI performance. Remotely manage media libraries. Purge unused artwork to free up space. Find missing media. Configurable QA check to highlight metadata issues. Aid in diagnosis of library and cache related problems.
Reply
#8
(2019-11-15, 18:12)Milhouse Wrote: Glad you got it working. Don't think mailto will work on LibreELEC as there's no sendmail/postfix installed by default and I don't think either is available from the repository.

Okay, thanks. At least for now I won't need it anyway, it's strange though that there seems to be now way to get the command output of crontab...
Reply



Logout Mark Read Team Forum Stats Members Help
Auto-backup music files to external HD under Kodi 18.40
This forum uses Lukasz Tkacz MyBB addons.