Skip to content
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

Idea: export/import #94

Open
korotkov13 opened this issue Mar 17, 2017 · 12 comments
Open

Idea: export/import #94

korotkov13 opened this issue Mar 17, 2017 · 12 comments
Labels
is: feature-request status: pinned This issue or pull request won't stale

Comments

@korotkov13
Copy link

Hi to all! I want to share an idea and function that I have long dreamed of.
Import and export of radio programs, smart blocks, playlists, users. It would be nice if you could quickly and easily transfer data from an old server / version to a new one and do not spend a lot of time adding everything manually.
How difficult is it to implement?

@Robbt
Copy link
Member

Robbt commented Mar 17, 2017

Since all of this is in the database it shouldn't be too difficult. The trickier part would be building the most user-friendly interface and instructions for doing this. I can imagine it being useful to share smart block snippets between stations as well.

@korotkov13
Copy link
Author

korotkov13 commented Mar 17, 2017

@Robbt > I can imagine it being useful to share smart block snippets between stations as well.

I could only dream of it)
I have many more ideas that need to be formulated correctly. I hope that some of them will be useful in the future.

@hairmare
Copy link
Member

The manual has instructions on how to import/export the Database directly at http://libretime.org/manual/backing-up-the-server/. At least for moving servers I believe this to be the proper way.

Import/export I see as interesting for multiple stations in a network that might want to share blocks and/or playlists. The code would need to take care of storing relations in the export and reloading them properly.

We should look if any library code exists that can help us get this done as I'd rather not implement the whole shebang. It does need a file format for the export and more to make sense.

If we want to implement something on the OR-mapper level we probably need to modernize that as well.

@hairmare
Copy link
Member

@HaJoHe This might also be of interest to you. If you go the backup route you want to back up the db, /etc/airtime, and /srv/airtime. In theory that should let you skip the initial setup on a restored machine. If not, you found a bug 😉

If you update to a new version it usually makes sense to run python utils/upgrade.py to get the db updated (though this should (i think) also happen automatically on certain requests)

@korotkov13
Copy link
Author

korotkov13 commented Mar 19, 2017

ubuntu 14. (OpenVZ VPS)

python utils/upgrade.py 
Requesting upgrade...
No upgrade was performed. The current schema version is 3.0.0-alpha.<br>

after migrating db from main server got this in logs

2017-03-20T01:13:50+03:00 INFO (6): radio.mydomain.xx Checking autoplaylist poll
2017-03-20T01:13:50+03:00 INFO (6): radio.mydomain.xx Checking to run Auto Playlist
2017-03-20T01:13:50+03:00 INFO (6): radio.mydomain.xx Scheduling 2
2017-03-20T01:13:50+03:00 ERR (3): radio.mydomain.xx [Logging.php:166 - loggingShutdownCallback()] - Call to a member function canSchedule() on a non-object at /usr/share/airtime/php/airtime_mvc/application/models/Scheduler.php:142
array (
'type' => 1,
'message' => 'Call to a member function canSchedule() on a non-object',
'file' => '/usr/share/airtime/php/airtime_mvc/application/models/Scheduler.php',
'line' => 142,
)
2017-03-20T01:13:51+03:00 INFO (6): radio.mydomain.xx Registered Component: pypo@myIP
2017-03-20T01:13:54+03:00 INFO (6): radio.mydomain.xx Registered Component: show-recorder@myIP
2017-03-20T01:13:54+03:00 WARN (4): radio.mydomain.xx SQLSTATE[55P03]: Lock not available: 7 ERROR: could not obtain lock on row in relation "cc_pref"
2017-03-20T01:13:54+03:00 INFO (6): radio.mydomain.xx Notifying RabbitMQ to send message to pypo
2017-03-20T01:15:54+03:00 INFO (6): radio.mydomain.xx Checking autoplaylist poll
2017-03-20T01:15:54+03:00 INFO (6): radio.mydomain.xx Checking to run Auto Playlist
2017-03-20T01:15:54+03:00 INFO (6): radio.mydomain.xx Scheduling 2

@geftactics
Copy link

I'm getting similar on a install onto ubuntu 14 on aws...

@korotkov13
Copy link
Author

Is there any way to transfer only the list of smart blocks and programs? @hairmare

@hairmare
Copy link
Member

It's trying to call canSchedule() on a user object which for some reason is empty. When exactly does it fail with this error? I'd like to reproduce it but haven't been able to.

@hairmare
Copy link
Member

@korotkov13 not that I know of, there is only the full backup transfer strategy at this point.

@korotkov13
Copy link
Author

korotkov13 commented Mar 21, 2017

I think the best way to add backup to settings as new option, and choosing what to backup.
screen shot 2017-03-21 at 20 31 18
And restore the same way

@hairmare hairmare modified the milestones: 3.0.0-alpha.1, 3.0.0-alpha.2 Mar 31, 2017
@hairmare hairmare modified the milestones: 3.0.0-alpha.3, 3.0.0-alpha.2 Jul 11, 2017
@hairmare hairmare removed this from the 3.0.0-alpha.3 milestone Oct 7, 2017
@Robbt
Copy link
Member

Robbt commented Nov 22, 2018

Perhaps we could use OPML for this. I do think that it would be a good idea to offer the ability to backup and restore or import/export shows etc.

Importing a calendar would need to deal with conflicts in terms of time etc or provide the option to overwrite whatever exists.

I also think that this could be useful as for both testing and development. In addition we could provide demo smartblock templates and even calendar that would help people get started with LibreTime.

@stale stale bot added the status: stalled This issue or pull request is stalled label Oct 20, 2019
@stale stale bot removed the status: stalled This issue or pull request is stalled label Oct 21, 2019
@JohnnyC1951
Copy link

I am just about to try exporting schedules to spreadsheets via the JSON API

@libretime libretime deleted a comment from stale bot Oct 26, 2019
@jooola jooola added status: pinned This issue or pull request won't stale and removed pinned labels Sep 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
is: feature-request status: pinned This issue or pull request won't stale
Projects
None yet
Development

No branches or pull requests

7 participants