INTERACT FORUM

Please login or register.

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

Author Topic: Command line for backup?  (Read 5172 times)

MarkCoutinho

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 676
Command line for backup?
« on: February 25, 2016, 08:15:40 am »

Just wondering: is there a command line that makes a backup of the MC database?
I want to implement such a command in a batch file and schedule that in Windows so that I never forget to make a backup (every day I backup/restore my database at my house and at the office).
Logged
Mark Coutinho
Dutch Top 40 collector of lyrics, sleeves and bios

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42444
  • Shoes gone again!
Re: Command line for backup?
« Reply #1 on: February 25, 2016, 08:55:45 am »

Backup isn't available from the command line.  Sorry.
Logged
Matt Ashland, JRiver Media Center

blgentry

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 8014
Re: Command line for backup?
« Reply #2 on: February 25, 2016, 09:24:16 am »

Hmm.  Core Command 20011 is backup library.  I believe parameter 1 will do an automatic backup.  So on windows you should be able to call that directly from the command line MCC.exe /MCC .  I don't have the windows version, so I'm not 100% sure on this.

You should also be able to call this with MCWS using the MCC method/action.

Brian.
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42444
  • Shoes gone again!
Re: Command line for backup?
« Reply #3 on: February 25, 2016, 09:58:20 am »

Hmm.  Core Command 20011 is backup library.  I believe parameter 1 will do an automatic backup.  So on windows you should be able to call that directly from the command line MCC.exe /MCC .  I don't have the windows version, so I'm not 100% sure on this.

You should also be able to call this with MCWS using the MCC method/action.

Brian.

Well you're a jedi!
Logged
Matt Ashland, JRiver Media Center

MarkCoutinho

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 676
Re: Command line for backup?
« Reply #4 on: February 25, 2016, 02:55:08 pm »

Hmm.  Core Command 20011 is backup library.  I believe parameter 1 will do an automatic backup.  So on windows you should be able to call that directly from the command line MCC.exe /MCC .  I don't have the windows version, so I'm not 100% sure on this.

You should also be able to call this with MCWS using the MCC method/action.

Brian.
Thanks for your answer, Brian. Base on your MCC-info I did another search on Google and it appears that this question has been asked before here on the forum - some 3 years ago: https://yabb.jriver.com/interact/index.php?topic=85439.0
I don't quite understand how/what to do with your information and the one from 3 years ago (since I'm not a good programmer) but I'll give it a go using the Wiki. Thanks so far, though! :-)
Logged
Mark Coutinho
Dutch Top 40 collector of lyrics, sleeves and bios

BryanC

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2678
Re: Command line for backup?
« Reply #5 on: February 25, 2016, 03:30:02 pm »

Thanks for your answer, Brian. Base on your MCC-info I did another search on Google and it appears that this question has been asked before here on the forum - some 3 years ago: https://yabb.jriver.com/interact/index.php?topic=85439.0
I don't quite understand how/what to do with your information and the one from 3 years ago (since I'm not a good programmer) but I'll give it a go using the Wiki. Thanks so far, though! :-)

Code: [Select]
mc21.exe /MCC 20011,1
Logged

MarkCoutinho

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 676
Re: Command line for backup?
« Reply #6 on: February 26, 2016, 02:35:30 am »

Thanks, I'll give it a go with that code (mc21.exe /MCC 20011,1).
I'll keep you posted
Logged
Mark Coutinho
Dutch Top 40 collector of lyrics, sleeves and bios

MarkCoutinho

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 676
Re: Command line for backup?
« Reply #7 on: February 28, 2016, 08:13:35 am »

Code: [Select]
mc21.exe /MCC 20011,1
That's exactly what I was looking for.
However.... Is it possible to add a path to it? Now it backups to the place that's noted in the options of MC. I want to keep that path for backup's sake, but I want the code to send the backup to another path.
Hope you can help me on that one too!
Logged
Mark Coutinho
Dutch Top 40 collector of lyrics, sleeves and bios

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: Command line for backup?
« Reply #8 on: February 28, 2016, 12:50:39 pm »

No, sorry. The only way to do it is to backup to the location set in Options > File Locations.
Logged
"Some cultures are defined by their relationship to cheese."

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

MarkCoutinho

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 676
Re: Command line for backup?
« Reply #9 on: February 28, 2016, 02:30:07 pm »

Okay, bummer. I'm still happy with the previous answer though :-)
Logged
Mark Coutinho
Dutch Top 40 collector of lyrics, sleeves and bios

muzicman0

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1239
Re: Command line for backup?
« Reply #10 on: February 28, 2016, 05:36:23 pm »

why not add a line to the CLI to move the backup file (or copy it) after creating it?  So create it in the default location, and then move it to wherever you want it.  Not sure what the naming scheme is, so I am not sure if you can do this, but I would think it would be possible in a batch file for sure.
Logged

MarkCoutinho

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 676
Re: Command line for backup?
« Reply #11 on: March 05, 2016, 03:03:21 am »

why not add a line to the CLI to move the backup file (or copy it) after creating it?  So create it in the default location, and then move it to wherever you want it.  Not sure what the naming scheme is, so I am not sure if you can do this, but I would think it would be possible in a batch file for sure.
Yeah, thanks for the tip. I figured something similar out. After backing up I start a new DOS-command which moves the file to the place (on Google Drive) where I want it to be.
The initial backing up line I'll put under a hotkey, so I can start that whenever I want.
Logged
Mark Coutinho
Dutch Top 40 collector of lyrics, sleeves and bios

BryanC

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2678
Re: Command line for backup?
« Reply #12 on: March 05, 2016, 09:20:59 am »

Yeah, thanks for the tip. I figured something similar out. After backing up I start a new DOS-command which moves the file to the place (on Google Drive) where I want it to be.
The initial backing up line I'll put under a hotkey, so I can start that whenever I want.

You can call an external batch script with a hotkey too, so you can have an AIO solution.
Logged
Pages: [1]   Go Up