INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: New Option for MCC_BACKUP_LIBRARY  (Read 5474 times)

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
New Option for MCC_BACKUP_LIBRARY
« on: August 09, 2013, 06:40:07 pm »

While lots of back-end stuff seems to be happening (by the way, I think I love the new Grouping stuff, and asked for as much a while back)... Can you add a ,1 option to MCC_BACKUP_LIBRARY that automatically (silently) saves a backup to the currently configured automatic backup location?

Pretty, pretty please, with a cherry on top?
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

InflatableMouse

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3978
Re: New Option for MCC_BACKUP_LIBRARY
« Reply #1 on: August 10, 2013, 12:29:29 am »

I'll add my cherry too.
Logged

MrHaugen

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 3774
Re: New Option for MCC_BACKUP_LIBRARY
« Reply #2 on: August 10, 2013, 04:26:37 am »

Yes, please. I'm terrified of my library breaking down when it only takes a backup at restart of the application. My server can go for lots of weeks before it's restarted.
Logged
- I may not always believe what I'm saying

jgreen

  • Citizen of the Universe
  • *****
  • Posts: 2419
Re: New Option for MCC_BACKUP_LIBRARY
« Reply #3 on: August 10, 2013, 04:33:14 pm »

This new backup, will it append an incrementing number to the saved filename, or will it simply overwrite the previous?
Logged

InflatableMouse

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3978
Re: New Option for MCC_BACKUP_LIBRARY
« Reply #4 on: August 11, 2013, 03:54:18 am »

It's not really new. MC currently backs up its library automatically based on  ... something. I don't really know. Whatever its triggers are, Glynor's suggestion would simply trigger this mechanism and force MC to do its thing.

I've seen monthly backups named "MC Library Backup (Main Library - August).zip" and "MC Library Backup (Main Library - August) (1).zip" with a creation date 5 days later. So it is capable of numbering but I can't remember seeing daily backups with a (1) in the name.

Personally I think it would be ideal if it would number the daily backups too, or even allow calling MCC_BACKUP_LIBRARY with a target path and/or filename if that's possible?

Logged

MrHaugen

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 3774
Re: New Option for MCC_BACKUP_LIBRARY
« Reply #5 on: August 11, 2013, 10:51:42 am »

A command for this would be great. But I believe that most people would find a simple "Backup each day" option sufficient. As long as it's triggered each day, and does not require MC to re restarted. I've always wondered why the old backup command gives you a prompt. Just removing that would probably give Glynor the tool he want?
Logged
- I may not always believe what I'm saying

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42372
  • Shoes gone again!
Re: New Option for MCC_BACKUP_LIBRARY
« Reply #6 on: August 11, 2013, 11:11:39 am »

Just to be clear, the program already makes regular backups.

I believe Glynor knows this, and is asking for a little addition.  It seems like a reasonable request, so we'll see what we can do.
Logged
Matt Ashland, JRiver Media Center

MrHaugen

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 3774
Re: New Option for MCC_BACKUP_LIBRARY
« Reply #7 on: August 11, 2013, 01:18:57 pm »

It does? When was this changed? I can't find any backups since my holiday started in June.
Logged
- I may not always believe what I'm saying

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42372
  • Shoes gone again!
Re: New Option for MCC_BACKUP_LIBRARY
« Reply #8 on: August 11, 2013, 02:22:47 pm »

It does? When was this changed? I can't find any backups since my holiday started in June.

I believe SwellGuy (Rick) added it sometime around MC12 or 13.
Logged
Matt Ashland, JRiver Media Center

MrHaugen

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 3774
Re: New Option for MCC_BACKUP_LIBRARY
« Reply #9 on: August 11, 2013, 02:25:13 pm »

And how does it work? Where are the backups? I've noticed nothing like this. I've even asked for this a number of times since MC12 through at least MC16 I think.
Last I heard of backups it was still triggered only at startup. Even if it was supposed to be "automatic".
Logged
- I may not always believe what I'm saying

InflatableMouse

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3978
Re: New Option for MCC_BACKUP_LIBRARY
« Reply #10 on: August 11, 2013, 03:31:20 pm »

It makes regular backups, but not reliably.

I see days pass without backups and then it does several days in a row.

I'd be happy if I can run a task schedule around midnight that dumps the library to a designated folder of choice, and I can leave MC's own backups for what it is.
Logged

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: New Option for MCC_BACKUP_LIBRARY
« Reply #11 on: August 11, 2013, 04:52:10 pm »

Just to be clear, the program already makes regular backups.

I believe Glynor knows this, and is asking for a little addition.  It seems like a reasonable request, so we'll see what we can do.

Correct.

And, yes, following the exact same naming system as is used for the Automatic backups is fine.  I just want a way to trigger an "auto backup" manually, in order to force a backup before an operation does Library manipulation (for my addon).  But, I figured it would be nice for simple "making sure I have a weekly backup" purposes too (via Windows Task Scheduler) for those people who don't end up restarting MC very often.

I assume the reason it doesn't do it on a schedule in the background anyway (and does it at startup) is that the Backup operation is intensive and makes MC otherwise unresponsive.  Since you don't know when MC isn't regularly "in use" (you don't want to make video or audio playback stutter or whatever), then the "safest" time is during startup and shutdown.

I'm not sure why, if that is the reason, that it can't just detect inactivity (must be inactive for 2+ hours or something), but I'm guessing it has to do with the Library Clients and the fact that REST is stateless, so maybe you don't really know...?

In any case, we can, if we choose, make guesses about when it is "safe" to make MC "busy" for a bit in the background (at 3am, for example, might be fine for me, but bad for the guy using MC at the club that doesn't close till 4am).
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

MrHaugen

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 3774
Re: New Option for MCC_BACKUP_LIBRARY
« Reply #12 on: August 12, 2013, 02:08:02 am »

Why not just make the time for nightly backups user configurable? I would be fine any way. Detection of inactivity, static time, what ever. But I would sleep a bit better if there were some way I knew my backups were taken more regularly.
Logged
- I may not always believe what I'm saying

jgreen

  • Citizen of the Universe
  • *****
  • Posts: 2419
Re: New Option for MCC_BACKUP_LIBRARY
« Reply #13 on: August 12, 2013, 07:08:25 am »

Actually JGreen knows this also, and is simply agitating for an automagical numeration so that intra-daily backups (in this case manuall triggered) don't overwrite each other.  The current backup naming scheme is date-based only.  User configurability works for me also.
Logged

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: New Option for MCC_BACKUP_LIBRARY
« Reply #14 on: August 12, 2013, 07:39:57 am »

Why not just make the time for nightly backups user configurable? I would be fine any way. Detection of inactivity, static time, what ever. But I would sleep a bit better if there were some way I knew my backups were taken more regularly.

That wouldn't actually solve my problem, and this would solve both, without adding an additional option => Options Bloat.
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

MrHaugen

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 3774
Re: New Option for MCC_BACKUP_LIBRARY
« Reply #15 on: August 12, 2013, 07:59:18 am »

I do understand that. It's just that commands and adding scheduled tasks to do this is not so user friendly. I would manage fine with it, so I'll just ask for the consideration of adding more reliable backups after Glynors wishes have been fulfilled :) I think more users who run servers with weeks and months of uptime would appreciate it.
Logged
- I may not always believe what I'm saying

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42372
  • Shoes gone again!
Re: New Option for MCC_BACKUP_LIBRARY
« Reply #16 on: August 12, 2013, 09:37:48 am »

Next build:
SDK: The MC command MCC_BACKUP_LIBRARY (20011) will perform a silent automatic backup when passed "1" as the parameter.
Changed: The program will run the automatic library code periodically instead of only at program start (so that running the program for long periods won't stop automatic backups from happening).
Logged
Matt Ashland, JRiver Media Center

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42372
  • Shoes gone again!
Re: New Option for MCC_BACKUP_LIBRARY
« Reply #17 on: August 12, 2013, 09:39:15 am »

A daily backup should be made every three days. 

A monthly is made once a month.

There's also provisions for cleaning up old backups, but I'm not sure the exact rules.
Logged
Matt Ashland, JRiver Media Center

InflatableMouse

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3978
Re: New Option for MCC_BACKUP_LIBRARY
« Reply #18 on: August 12, 2013, 09:48:35 am »

Thanks Matt. Appreciate it!  :D
Logged

jgreen

  • Citizen of the Universe
  • *****
  • Posts: 2419
Re: New Option for MCC_BACKUP_LIBRARY
« Reply #19 on: August 12, 2013, 11:54:21 am »

An "expert mode" global option is a great way to cure option bloat.
Logged

MrHaugen

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 3774
Re: New Option for MCC_BACKUP_LIBRARY
« Reply #20 on: August 12, 2013, 02:06:46 pm »

Great! Thanks Matt. I'll sleep a bit better now :)
Logged
- I may not always believe what I'm saying

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: New Option for MCC_BACKUP_LIBRARY
« Reply #21 on: August 12, 2013, 05:06:30 pm »

Next build:
SDK: The MC command MCC_BACKUP_LIBRARY (20011) will perform a silent automatic backup when passed "1" as the parameter.
Changed: The program will run the automatic library code periodically instead of only at program start (so that running the program for long periods won't stop automatic backups from happening).

Who's awesome?  ^^^^  That guy!
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

InflatableMouse

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3978
Re: New Option for MCC_BACKUP_LIBRARY
« Reply #22 on: August 13, 2013, 09:03:43 am »

Yup! Works great too and files get numbered if there's already one with the same name.
Logged
Pages: [1]   Go Up