• 1
  • 49
  • 50
  • 51(current)
  • 52
  • 53
  • 131
[Release] Backup (formerly XBMC Backup)
I sure can. Just an oversight on my part since I don't use these myself.

Do you think they should be included with "config files" or have a separate setting? My gut says config files make more sense as this is where other folders like keymaps and peripheral_data fall.
Reply
hello my name is maor
i need help in changing the xbmc backup addon to work better for me


all my family have xbmc but live in diffrent places

so i want to create backups from y pc to dropbox via xbmc backup

but.....

is it possible that when i upload new backup they will get notification for new backup and then the option to restoreHuh

i want to make it easy for them as they have no idea what they do hhhh and every change i make in the system i need to go over and start updating and restoring there systems


any 1 have any idea what can be doneHuh?
Reply
You could modify the scheduler.py file of the addon to periodically check for restore points. You'd have to store the last known point in a txt file or something to refer against. There are some methods already available so you could do something like:

Code:
#create backup object
backup = XbmcBackup()

#list backups
restorePoints = backup.listBackups()

for aDir in restorePoints:
                #this is an array, 0 index is folder name, 1 is backup name as a string
                if int(aDir[0]) > lastBackup:
                        #notify user here

The scheduler start() method will execute every 500 ms so I'd just put something in there that executes every 6 hrs or something. If you really wanted to get fancy you could use the cron syntax parser already bundled with the addon (see the findNextRun() method) and do something based of a cron schedule .
Reply
Well I now realize why my backup is failing.

Bad rights. Does NOT have write permissions.

You really ought to check that before you attempt to do a backup overt NFS or SMB.
Reply
(2014-10-23, 16:36)robweber Wrote: I sure can. Just an oversight on my part since I don't use these myself.

Do you think they should be included with "config files" or have a separate setting? My gut says config files make more sense as this is where other folders like keymaps and peripheral_data fall.

Oops, sorry, forgot to check this thread. I'd think config files would be good, because they're similar to keymaps, like you said. Thanks for looking into it :D
Reply
(2014-10-31, 00:10)war59312 Wrote: Well I now realize why my backup is failing.

Bad rights. Does NOT have write permissions.

You really ought to check that before you attempt to do a backup overt NFS or SMB.

I always thought of file permissions as a user issue. I guess I figured if the backup didn't produce any files then it was up to you to figure out if you could write the directory or not.

You do make a good point though, that a simple check when the backup starts wouldn't hurt. The "write" function does return a true/false value if it succeeds. Would be easy and kind of helpful to inform the user that files can't be written and ask if it should continue. Thanks for the suggestion.
Reply
Destination write permissions are now checked when the addon attempts to create the validation file at the start of the backup. You will get a prompt, which you can dismiss if you think it's wrong. If you click no, or the dialog times out, the addon will quit.

Also added some limited restoration of guisettings.xml information. Using the JSONRPC interface it is possible to set some of the system settings values using the Settings.SetSettingValue function. As a post processing job this addon will now attempt to read in your old guisettings.xml file from the restore point and update any settings it can. This is done by comparing the settings you have to the defaults in XBMC. Where your settings differ a JSON request will be sent to update the setting. This will not work for skin specific settings so those are still left out. It will however get you all your localization, time, audio, and other XBMC core settings back.

These changes are not in the repo yet. I'm going to test them and do a pull request after the weekend. Pull from github if you want them early.
Reply
Hi Rob

Thanks for the help on setting up an advanced setting xml to bring over my watched status. It took me a bit but I figured it out.


To bring over the gui settings, will powering off right after the Back Up bring back all my gui settings after a restart? I am applying the back up on an identical fully factory reset box.
Reply
On the newest version of the addon you will get limited settings from the guisettings file on a restore. This is because I can only set system settings via the json-rpc interface. This means view settings and skin specific settings will be lost. If you really need these I would manually move the guisettings file as detailed in the FAQ on page one of this thread. I really wish there was a better way but this is as good as I can do until there is a way to restore the full file while xbmc is running.
Reply
Thanks for the quick reply. I just started restoring. I will copy from identical box my gui xml in user data to a msd card using Es file explorer (Andriod Box) and then copy to new box after first deleting the guisettings xml on new box. Will this work?
Reply
hello, i´m trying your xbmc backup but i can´t do a backup to dropbox, it seem work because it create a a folder , inside that, all folder are empty, i try this https://raw.githubusercontent.com/robweb...lib/vfs.py on page 45 but the link does not work, i don´t have any kind of error if you need i provide a log
Reply
^

You probably have this checked. Settings/ Appearance/ Show hidden files.
Reply
I just installed this app. I tried creating a share on the network to back up everything to my comp, didn't work.

I created a dropbox account and tried using this method, also having issues - when I hit backup I get - Check log for dropbox authorize url - click ok when authorized. I copy and pasted the link on my PC, I got an error - The request to link the app is invalid

I alsooo tried creating a windows share and connecting via samba - connection timed out. My machine is on a domain though bc I only have a work machine...would this be the reason it's preventing? bc its not on a workgroup

Last but not least, I can't even create an FTP share, tried with hostname, I.P, tested out the paths on my pc, in xbmc it's not working..

This is literally driving me insane. Help plz!

Thanks
Reply
(2014-11-09, 05:40)spager Wrote: Thanks for the quick reply. I just started restoring. I will copy from identical box my gui xml in user data to a msd card using Es file explorer (Andriod Box) and then copy to new box after first deleting the guisettings xml on new box. Will this work?

Hi Rob;

The Back up did not work for me. Could be because I have an advanced setting xml. Would it be easier for me to copy files/folders to a msd card from my original identical box and transfer them to the new box? If so which folders do I bring over.
Reply
Hello,

My name is Jonathan and I would like to be able to run a shell script file after saving and an other after restoring.
I want to save and copy some files after stopping a service and then start again this service.

In settings.xml I had the last 4 lines
Code:
    <category id="selection" label="30012">
        ...
        <setting id="custom_dir_2_enable" type="bool" label="30037" default="false" />
        <setting id="backup_custom_dir_2" type="folder" label="30018" default="" visible="eq(-1,true)"/>
        <setting id="custom_script_save_enable" type="bool" label="30100" default="false" />
        <setting id="backup_custom_script_save_enable" type="file" label="30018" default="" visible="eq(-1,true)"/>
        <setting id="custom_script_restore_enable" type="bool" label="30101" default="false" />
        <setting id="backup_custom_script_restore_enable" type="file" label="30018" default="" visible="eq(-1,true)"/>

In strings.xml, I had the last 3 lines:
Code:
<strings>
    <string id="30086">This version of XBMC is different than the one used to create the archive</string>
    <string id="30100">Script to run after saving</string>
    <string id="30101">Script to run after restoring</string>
    <string id="30102">Run the script</string>

In backup.py, it's difficult for me because I don't know where to find the xmbcgui xbmc ...functions.
After "#check if there are custom directories", I had

Code:
import os
            import subprocess
            #check if there is a custom script to run after saving
            if(utils.getSetting('custom_script_save_enable') == 'true' and utils.getSetting('backup_custom_script_save_enable') != ''):

                if(not os.path.exists(utils.getSetting('backup_custom_script_save_enable'))):
                    xbmcgui.Dialog().ok(utils.getString(30010),utils.getString(30102),utils.getSetting('backup_custom_script_save_enable'))
                    return
                else:
                    xbmcgui.Dialog().ok(utils.getString(30010),utils.getString(30084),utils.getSetting('backup_custom_script_save_enable'))
                    subprocess.call("."+utils.getSetting('backup_custom_script_save_enable'), shell=True)
                    # os.system(utils.getSetting('backup_custom_script_save_enable'))

Could you please help me to launch a script from backup.py? and to prompt if there was an error at which line of the script?

Thanks in advance
Reply
  • 1
  • 49
  • 50
  • 51(current)
  • 52
  • 53
  • 131

Logout Mark Read Team Forum Stats Members Help
[Release] Backup (formerly XBMC Backup)10