[ATV] backup & restore scripts - Printable Version +- Kodi Community Forum (https://forum.kodi.tv) +-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33) +--- Forum: General Support (https://forum.kodi.tv/forumdisplay.php?fid=111) +---- Forum: Mac OS X (https://forum.kodi.tv/forumdisplay.php?fid=56) +---- Thread: [ATV] backup & restore scripts (/showthread.php?tid=59126) Pages:
1
2
|
[ATV] backup, getsvn, install & restore scripts - TeknoJnky - 2009-10-05 I hacked up some simple backup, getsvn download, and restore shell scripts for the ATV, I've tested them on my atv they work fine but of course I assume no liability if your atv blows up or anything else unexpected happens. only one backup is maintained, any previous backup is removed before creating the new one. when restoring, the old/bad build is removed and the backup is copied to the applicable folders. Also, make sure xbmc isn't running of course. copy/create both scripts in the frontrow folder make them both executable create a backup folder "XBMC.bak" in the frontrow folder. If you don't create the XBMC.bak folder then nothing is backed up. to run them, simply ssh and execute: ./backup.sh ./getsvn.sh 23524 ./installtgz.sh XBMC_OSX_23524.tgz ./restore.sh substitute the build# and filename as applicable, you can use any builld# available @ http://sshcs.com/xbmc/?mode=BO ./backup.sh Code: #!/bin/sh ./getsvn.sh Code: #!/bin/sh ./installtgz.sh is simply xbmc-9.04_update_sshcs.sh renamed (its autodownloaded if needed by getsvn.sh) ./restore.sh Code: #!/bin/sh - amet - 2009-10-07 hi, this is very helpful, Thanks! I wanted to ask you, is it possible to make it backup different versions in version number folders?. -- XBMC.bak -- r22240
[INDENT]-- XBMC [/INDENT][INDENT]-- XBMC.app [/INDENT]-- r22528
[INDENT]-- XBMC [/INDENT][INDENT]-- XBMC.app [/INDENT]we can then restore the specific version(./restore.sh r22240).Version info can be obtained from "/Volumes/frontrow/Applications/XBMC.app/Contents/Info.plist" Thanks Zeljko - MaestroDD - 2009-10-07 Hey TeknoJnky, nice work! you might want to combine those backup scripts with the ability to install the backups in Launcher. If you need hints or have any questions, please feel free to ask. First thing could be to add a (dummy) download location to the plist that points to a local one (via defaults write com.teamxbmc.xbmclauncher XBMCAdditionalDownloadPlistURLs). That plist is has no download (or maybe a dummy), but just runs your restore script. Next might be automatic backup on install. This could be done by wrapping the sshcs installer script and additionally call your backup script. Again, if there are any problems, feel free to ask. HTH, mdd - TeknoJnky - 2009-10-07 I'm sure its possible, but there are some issues that would have to be worked out like, how would the script be able to automatically determine what exact build was active in order to create the revision subfolders for one. Ideally, I'd love a script that functions like the t3ch upgrader, allowing for multiple builds to be installed and letting you switch between them at will, but I don't have the unix scripting knowledge/knowhow to make something that complex. I will be adding a couple more scripts to make it easier to make the whole process easier to: backup the current build (done) download any specific svn (from any available at sshcs) install any specific svn that was downloaded restore backup build (done) I also welcome any suggestions/improvements/etc. edit: thanks mdd eventually I'd like to have something available/working from the launcher but I think the biggest problem is I would have to figure out how to interface with the plists and launcher to/from the script(s). I know vbscript somewhat well, but shell scripting is something entirely new for me. - amet - 2009-10-07 TeknoJnky Wrote:I'm sure its possible, but there are some issues that would have to be worked out like, how would the script be able to automatically determine what exact build was active in order to create the revision subfolders for one. I am not too sure how to do it, but I am sure it can be done. you can get the version number from /Volumes/frontrow/Applications/XBMC.app/Contents/Info.plist as for the switching between the builds you could do it by creating the symbolic link to the revision e.g. ln -s /Users/frontrow/XBMC.bak/XBMC.app Applications/XBMC.app Zeljko - TeknoJnky - 2009-10-07 yea I am doing something like now manually for the applications folder, I keep a working build @ Applications/XBMC.working and then symlink XBMC.app to it, so right now the existing sshcs downloaded overwrites the XBMC.app, I go after and manually mv it to XBMC.build# then do the XBMC.app symlink. If I were to emulate the t3ch upgrader script, I would do exactly that (have a designated svn folder, with symlinks to the active .app and XBMC folders). - MaestroDD - 2009-10-07 TeknoJnky Wrote:[...]but I think the biggest problem is I would have to figure out how to interface with the plists and launcher to/from the script(s). In a first try, I'd just add 2 "downloads", that simply call your 2 scripts. Should be as simple as this plist: Code: <?xml version="1.0" encoding="UTF-8"?> This is untested, but *should* work somehow like that. I think the URL needs to be provided, so just give Launcher something. Hopefully "downloading" the script should also from a file:// URL. Let me know if there are any problems. Second step could be to dynamically modify that plist once a new backup was done, so it appears in the downloads list. cheers, mdd - TeknoJnky - 2009-10-08 A teaser for what I'll put shortly... Quote:login as: frontrow - Elbert - 2009-10-28 Thanks for these scripts, they are very helpful. - Riderzzz - 2009-10-31 Is there anything missing on my machine when it cant execute the command WGET. i just get a command not found on the lines with wget. rest of scripts works perfectly, Thanks alot! UPDATE: Installed the binutils manually and works. Great script, worked like a charm! Thanks! - Bobby Blixberg - 2010-01-22 Nice sripts - but I get this output: bad interpreter: No such file or directory I'm a Windows user. Searched for the error and tried different solutions, but none of them worked for me. Most likely it is an editor problem...? I have also tried WinVI with the same result. Please tell me how to get this work - Jimmer - 2010-01-22 Bobby Blixberg Wrote:Nice sripts - but I get this output: Do you have nano on your ATV? It's a must have! Then you can SSH in and create/edit scripts in a terninal window irregardless of your computer's OS. Try SSHing in and issuing: nano test you should be launched into the editor and it will create automatically a new file called test. ctrl-x allows you to exit and prompts for save y/n. Pretty straightforward.. Jim - Bobby Blixberg - 2010-01-22 Great - it works. Thank you very much, Jimmer! - grey - 2010-02-01 can i download from the official nightlies from mirrors.xbmc.org/nightlies/osx/ ? - sircube - 2010-02-01 Scripts work great! Thanks for the effort, TeknoJnky. |