Giter Site home page Giter Site logo

automatic-full-backup's People

Contributors

dima73 avatar hains avatar marto74bg avatar persianpros avatar pr2git avatar vytenisp avatar wxbet avatar yura253 avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

automatic-full-backup's Issues

BackUp on VU+ Uno 4K

First of all a big thanks for this valuable plugin.
There is a small problem when using the plugin on Uno 4K. As you might know the VU+ Uno 4K flashes the Backup Files by checking the "force.update" file in BackUp folder without confirmation by using the power button. This means the Uno4k flashes the Backup when the receiver is booting or rebooting. No confirmation is needed. The "force.update" file can be renamed to "noforce.update" of course but this just helps until next automatic BackUp creation. All files in Backup folder will be deleted and new Backup files will be saved including a new "force.update". Would it be possible to include a check for noforce.update and if existing in folder not to create a new force.update? Maybe you have a better solution.
Anyway, this plugin is a "Must have" for E2.

Automaticfullbackup on VU+ Ultimo4K crashes enigma2

I am using VTI 11.0.1 with all the current updates and v5 of afb,
but most of the backups in the night crash enigma2 (Display shows the time of the start of the backup, box is reachable via network, enigma2 is shown as defunct())
unfortunately there is nothing in the debug.log which could help.
I had the same issue with all the previous versions as well.
It doesnt matter, if I write the backup to USB-stick(FAT32) or internal hdd(ext4)
Any suggestion what to check?

Backup folder won't be saved

Hi,

on my Solo 4K, I can choose /media/hdd as the backup folder and create a manual backup on my HDD. However, when I leave the plugin (via green button), the backup path will not be saved. Next time I enter the plugin, it just says "None" as backup folder.

Error Message Image creation FAILED!

I use Version 4,7. Ultimo4k and VTI Image 11
When I use the tool for backup i got the error message: Image creation FAILED!
But it seems that all files are created....
afb_backup3
afb_backup1
afb_backup2

Reflashing doesn´t work - VU+ UNO4k

Hi
I´m a VU+ Uno4k User on VTI 11.0.2 with all the current update and use the last afb 5.7
Backups creating fine, but if i want to reflashing my image with this backup, the box are doesn´t finish this. waiting over 2 hours but nothing happent, the loading bar still standing in the last area. i test this 5 times and it´s always the same, the flash process will never finish. turn off the box and they doesn´t start, the only way is to flash with usb stick
when i created a backup with the vti image and copy the files into the VUPlus Folder it´s working fine.
the imagesize are also different:
Automatic Full Backup = 584 MB
VTI Image Backup = 260 MB

Py3

Is it possible to modify the plug for py3?

AFB blocks vu+ Box in VTi

during automatically started backup the remote control of vu+ boxes is blocked and the spinner is shown. If you start AFB manually the box is fully controlable with the remote control. Is that a wanted behaviour?
Version 5.9 and 6.2 tested with VU+ Duo2 and VTi 13.0.2

Restore won't finish

Hi,
I like this pluging and use it ..... but the first time when I tried to restore a backup made on disk few days before had this problem, Restore started but won't finish ..... had to power off the box and flash from USB.
My box is a VU+ solo 4K.

restore

VU+ Duo 4k only works on manual backup

Hi,

thanks to your version 6.6 which works when I do a command line backup, but doesn't on the automatic backup function. That means that only these files will be saved on the automatic backup:

-rw-r--r--    1 nobody   nogroup         15 Jan 13 04:00 imageversion
-rw-r--r--    1 nobody   nogroup   16777216 Jan 13 04:00 kernel_auto.bin
-rw-r--r--    1 nobody   nogroup         83 Jan 13 04:00 nomkpart.update
-rw-r--r--    1 nobody   nogroup         43 Jan 13 04:00 reboot.update

As you can see it differs from the manual backup which saves these files:

-rw-r--r--    1 nobody   nogroup         15 Jan 13 08:49 imageversion
-rw-r--r--    1 nobody   nogroup   16777216 Jan 13 08:49 kernel_auto.bin
-rw-r--r--    1 nobody   nogroup         83 Jan 13 08:49 nomkpart.update
-rw-r--r--    1 nobody   nogroup          0 Jan 13 08:49 openpli 7.0-rc
-rw-r--r--    1 nobody   nogroup         43 Jan 13 08:49 reboot.update
-rw-r--r--    1 nobody   nogroup   68019059 Jan 13 08:49 rootfs.tar.bz2

Any chance to check why this behavior happens?

Supply .bb

Please can you supply a .bb in your git so this can be used to build the plugin directly and offer it from feeds.

Vu+ Duo 4k & Zero 4k Support

Hi Dimitrij, I really like your plugin and hope that you will take some time and adjust automatic-fullbackup-vu4k.sh so Duo 4k and Zero 4k can also be supported.

I think only Uno 4k and Zero 4k have no display and need force.update files.

root@vuduo4k:~# cat /proc/stb/info/vumodel
duo4k
Kernel / Driver:
4.1.45 / 4.1.45-20181130.r0

Thank you!

#!/bin/sh

VERSION="vu4k models- 20/11/2017\ncreator of the script Dimitrij (http://forums.openpli.org)\n"
DIRECTORY="$1"
START=$(date +%s)
DATE=date +%Y%m%d_%H%M
IMAGEVERSION=date +%Y%m%d
MKFS=/bin/tar
BZIP2=/usr/bin/bzip2
ROOTFSTYPE="rootfs.tar.bz2"
WORKDIR="$DIRECTORY/bi"

getaddr() {
python - $1 $2<<-"EOF"
from sys import argv
filename = argv[1]
address = int(argv[2])
fh = open(filename,'rb')
header = fh.read(2048)
fh.close()
print "%d" % ( (ord(header[address+2]) <<16 ) | (ord(header[address+1]) << 8) | ord(header[address]) )
EOF
}

if [ -f /etc/issue ] ; then
ISSUE=cat /etc/issue | grep . | tail -n 1
IMVER=${ISSUE%?????}
elif [ -f /etc/bhversion ] ; then
ISSUE=cat /etc/bhversion | grep . | tail -n 1
IMVER=${ISSUE%?????}
elif [ -f /etc/vtiversion.info ] ; then
ISSUE=cat /etc/vtiversion.info | grep . | tail -n 1
IMVER=${ISSUE%?????}
elif [ -f /etc/vtiversion.info ] ; then
ISSUE=cat /etc/vtiversion.info | grep . | tail -n 1
IMVER=${ISSUE%?????}
elif [ -f /proc/stb/info/vumodel ] && [ -f /etc/version ] ; then
ISSUE=cat /etc/version | grep . | tail -n 1
IMVER=${ISSUE%?????}
else
IMVER="unknown"
fi

echo "Script date = $VERSION\n"
echo "Back-up media = $DIRECTORY\n"
df -h "$DIRECTORY"
echo "Back-up date_time = $DATE\n"
echo "Working directory = $WORKDIR\n"
echo -n "Drivers = "
opkg list-installed | grep dvb-proxy
CREATE_ZIP="$2"
IMAGENAME="$3"

if [ -f /proc/stb/info/vumodel ] ; then
MODEL=$( cat /proc/stb/info/vumodel )
if [ $MODEL = "solo4k" ] ; then
echo "Found VU+ Solo 4K\n"
MTD_KERNEL="mmcblk0p1"
KERNELNAME="kernel_auto.bin"
elif [ $MODEL = "uno4k" ] ; then
echo "Found VU+ Uno 4K\n"
MTD_KERNEL="mmcblk0p1"
KERNELNAME="kernel_auto.bin"
elif [ $MODEL = "uno4kse" ] ; then
echo "Found VU+ Uno 4K se\n"
MTD_KERNEL="mmcblk0p1"
KERNELNAME="kernel_auto.bin"
elif [ $MODEL = "ultimo4k" ] ; then
echo "Found VU+ Ultimo 4K\n"
MTD_KERNEL="mmcblk0p1"
KERNELNAME="kernel_auto.bin"
elif [ $MODEL = "duo4k" ] ; then
echo "Found VU+ Duo 4K\n"
MTD_KERNEL="mmcblk0p1"
KERNELNAME="kernel_auto.bin"
elif [ $MODEL = "zero4k" ] ; then
echo "Found VU+ Zero 4K\n"
MTD_KERNEL="mmcblk0p1"
KERNELNAME="kernel_auto.bin"

else
echo "No supported receiver found!\n"
exit 0
fi
TYPE=VU
SHOWNAME="Vu+ $MODEL"
MAINDEST="$DIRECTORY/vuplus/$MODEL"
EXTRA="$DIRECTORY/automatic_fullbackup/$DATE/vuplus"
echo "Destination = $MAINDEST\n"
else
echo "No supported receiver found!\n"
exit 0
fi

if [ ! -f $MKFS ] ; then
echo "NO TAR FOUND, ABORTING\n"
exit 0
fi
if [ ! -f "$BZIP2" ] ; then
echo "$BZIP2 not installed yet, now installing\n"
opkg update > /dev/null 2>&1
opkg install bzip2 > /dev/null 2>&1
echo "Exit, try again\n"
sleep 10
exit 0
fi

echo "Starting Full Backup!\nOptions control panel will not be available 2-15 minutes.\nPlease wait ..."
echo "--------------------------"

control_c(){
echo "Control C was pressed, quiting..."
umount /tmp/bi/root 2>/dev/null
rmdir /tmp/bi/root 2>/dev/null
rmdir /tmp/bi 2>/dev/null
rm -rf "$WORKDIR" 2>/dev/null
exit 255
}
trap control_c SIGINT

echo "\nWARNING!\n"
echo "To stop creating a backup, press the Menu button.\n"
sleep 2

PREPARING THE BUILDING ENVIRONMENT

rm -rf "$WORKDIR"
echo "Remove directory = $WORKDIR\n"
mkdir -p "$WORKDIR"
echo "Recreate directory = $WORKDIR\n"
mkdir -p /tmp/bi/root
echo "Create directory = /tmp/bi/root\n"
sync
mount --bind / /tmp/bi/root

#dd if=/dev/$MTD_KERNEL of=$WORKDIR/kernel.dump
#ADDR=$(getaddr $WORKDIR/kernel.dump 44)
#dd if=$WORKDIR/kernel.dump of=$WORKDIR/$KERNELNAME bs=$ADDR count=1 && rm $WORKDIR/kernel.dump
dd if=/dev/$MTD_KERNEL of=$WORKDIR/$KERNELNAME > /dev/null 2>&1
echo "Kernel resides on /dev/$MTD_KERNEL\n"

echo "Start creating rootfs.tar\n"
#$MKFS -jcf $WORKDIR/$ROOTFSTYPE -C /tmp/bi/root .
$MKFS -cf $WORKDIR/rootfs.tar -C /tmp/bi/root --exclude=/var/nmbd/* .
$BZIP2 $WORKDIR/rootfs.tar

TSTAMP="$(date "+%Y-%m-%d-%Hh%Mm")"

if [ $TYPE = "VU" ] ; then
rm -rf "$MAINDEST"
echo "Removed directory = $MAINDEST\n"
mkdir -p "$MAINDEST"
echo "Created directory = $MAINDEST\n"
mv "$WORKDIR/$KERNELNAME" "$MAINDEST/$KERNELNAME"
mv "$WORKDIR/$ROOTFSTYPE" "$MAINDEST/$ROOTFSTYPE"
echo "$MODEL-$IMAGEVERSION" > "$MAINDEST/imageversion"
if [ $MODEL = "uno4k" ] || [ $MODEL = "uno4kse" ] ; then
echo "rename this file to 'force.update' when need confirmation" > "$MAINDEST/noforce.update"
else
echo "This file forces a reboot after the update" > "$MAINDEST/reboot.update"
fi
if [ -z "$CREATE_ZIP" ] ; then
mkdir -p "$EXTRA/$MODEL"
echo "Created directory = $EXTRA/$MODEL\n"
touch "$MAINDEST/$IMVER"
cp -r "$MAINDEST" "$EXTRA"
touch "$DIRECTORY/automatic_fullbackup/.timestamp"
else
if [ $CREATE_ZIP != "none" ] ; then
echo "Create zip archive..."
cd $DIRECTORY && $CREATE_ZIP -r $DIRECTORY/backup-$IMAGENAME-$MODEL-$TSTAMP.zip . -i /$MODEL/*
cd
fi
fi
if [ -f "$MAINDEST/rootfs.tar.bz2" -a -f "$MAINDEST/$KERNELNAME" ] ; then
echo " "
echo "BACK-UP MADE SUCCESSFULLY IN: $MAINDEST\n"
else
echo " "
echo "Image creation FAILED!\n"
fi
fi
umount /tmp/bi/root
rmdir /tmp/bi/root
rmdir /tmp/bi
rm -rf "$WORKDIR"
sleep 5
END=$(date +%s)
DIFF=$(( $END - $START ))
MINUTES=$(( $DIFF/60 ))
SECONDS=$(( $DIFF-(( 60*$MINUTES ))))
if [ $SECONDS -le 9 ] ; then
SECONDS="0$SECONDS"
fi
echo "BACKUP FINISHED IN $MINUTES.$SECONDS MINUTES\n"
exit

Feature Request: Manual type in of backup location

Hi,

I would like to make a feature request:
On the VU+ models, it is not easily possible to select a (remote) backup location with different path, for example a NAS.

In Automatic Full Backup I can only choose between USB, mounted network share (autofs), etc.
In my example I have autofs correctly configured and have 4 mounts, but in automatic full backup plugin I onle get 2 destination points for the backup:
/media/usb
/media/net/autofs/NAS

I dont want the backup to be in /media/net/autofs/NAS. I rather would like to have the backup in a different folder location, in example /media/net/autofs/NAS/backups.
My problem is that the plugin gives me only the 2 backup destinations mentioned above.
It would be nice, if we could also add a new backup location manually with the On-Screen-Keyboard for example. Or you could make the mounted network share detection on the VU+ models a little bit better to also find and display the other correctly mounted autofs shares on the box.

Many thanks in advance.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.