alexreinert / piVCCU

piVCCU is a project to install the original Homematic CCU3 firmware inside a virtualized container (lxc) on ARM based single board computers.
Apache License 2.0
302 stars 64 forks source link

[Question] Difference between WebUI backup & pivccu-backup #472

Closed steilerDev closed 1 year ago

steilerDev commented 1 year ago

Thanks for the great work @alexreinert !

I got a quick question (as I'm currently working on an effective backup strategy for my environment).

I'd like to initiate a backup from a remote host. Since the WebUI has a backup functionality, I could use this to create the file. However I see that the pivccu-backup script does some significant work in order to generate the backup file. Is there any significant difference between the two methods - is one preferred over the other?

alexreinert commented 1 year ago

The resulting backup file is the same, but with pivccu-backup you can automate the backup process e.g. by cron.

steilerDev commented 1 year ago

looking into the resulting files, I can actually see some differences :)

pivccu-backup bundles the installed addons completely (I got hap-homematic installed), the CCU native backup only has empty folders. Additionally pivccu-backup has an empty eQ-3-Backup folder.

The rest seems to be equivalent :)

Thanks for the quick feedback!

steilerDev commented 1 year ago

If anyone is interessted in my script for getting the file off the API:

CCU_HOST="http://ccu.net"                                     
TARGET="/home/ccu/"                                                    

if [ ! -d $TARGET ]; then                                                       
    mkdir -p $TARGET                                                            
fi                                                                              

# Acquire session id                                                            
SESSION_ID=$(curl -Ls -o /dev/null -w %{url_effective} "${CCU_HOST}/pages/index.htm?client=3" | grep -oE @.*@)

if [ -z $SESSION_ID ]; then                                                     
    echo "Unable to acquire session id!"                                        
    exit 1                                                                      
fi                                                                              

wget "${CCU_HOST}/config/cp_security.cgi?sid=${SESSION_ID}&action=create_backup" \
    -O ${TARGET}/ccu-backup-$(date -Iseconds).tar.gz
alexreinert commented 1 year ago

I assume, that where is now an issue in the native backup as we addons were included in the native backup, too.

steilerDev commented 1 year ago

hmm - is there a place to report this with eQ3?

alexreinert commented 1 year ago

They will deny any support request that is not using the original CCU3 image on original CCU3 hardware. And they deny any support request that includes 3rd party addons.

steilerDev commented 1 year ago

oh fun - are there first party add ons? it would be interesting to see if those are included in the backup on an 'official' CCU

alexreinert commented 1 year ago

Not that I know.