I would like to make a complete backup of the entire image but the tool that comes
auto backup backs up only the system settings
what program I can use to do it full?
Thank You
Zgemma Openpli Full backup
Re: Zgemma Openpli Full backup #2
Re: Zgemma Openpli Full backup #3
Posted 31 July 2015 - 13:27
wel if You wan't to make you're own backup by linux systems.
I do have here an example script that I use for my main home server (ubuntu 14.04 ) this runs by me each day as a cronjob. (sudo used)
On a pc set this script adapted to You're personal needs preferences in a protected folder such as /usr/bin or /usr/local/bin .
If You wan't to make something for an stb adapt the script to be ok for that.
Yes I did had one day a hardrive which was ko.
What I did insert the new drive (which I received in garanty lucky for that since it was a 500 gb ssd)
Just reinstalled very base ubuntu. (Time 30 minutes).
then expanded the last both tars as root user both tars (as root user). (time +- 2 hours)
Shut down pc started into base terminal mode and use cp -af (-a from archive -f from force) archive means preserve all recursive and preserve link's.
For both as well the $home directory files and system / map.
system tooks (20 minutes) (home dir took 90 minutes)
Then just restarted pc and I was completely where I was before the hd failure whitout any data and or setting loss
It's pure kiss rule (keep it simple stupid) but work very good.
Need More info about commands used : Internet is You're friend.
#!/bin/bash MYHOMEDIR="/home/<You're home/dir>" # Adapt this to You're homedir. Needed cause script is executed as root user. BACKUPDIR="/media/backup/system" # mount point of backup media DIRDATETIME=`date +"%Y%m%d-Time%H%M"` # fetching current date and time. NUMBERSBACKUP=`find $BACKUPDIR -mindepth 1 -type d | wc -l` # Keep only the last three backups. if [[ $NUMBERSBACKUP > 2 ]] ; then # searching oldest backup. ERASE=`find $BACKUPDIR -mindepth 1 -maxdepth 1 -type d | sed -e "s/\.\///g" | sort | awk 'NR==1{printf "%s", $0}'` echo "$NUMBERSBACKUP backups found The oldest $ERASE will be removed" rm -rf "$ERASE" # removing oldest backup fi mkdir $BACKUPDIR/$DIRDATETIME # Backup sytem whitout home -,virtuals - and medias directory. . # Why like below ? I gonna make a tar archive file. # I can't use -type f since it will issue to many arguments error. # The files and or links in dept 1 dir are well added with type -f and -l(for links) # By system I first excluded /var, Ad it later on seperately then some depth 2 dirs can be excluded. SYSTEM=`find / -mindepth 1 -maxdepth 1 -type d \( -wholename /proc -o -wholename /dev -o -wholename /tmp -o -wholename /var -o -wholename /sys -o -wholename /media -o -wholename /home -o -wholename /lost+found -o -wholename /run \) -prune -o -type d -print` # system files # files and links(not the content but link self) in / directory They are not included in the above -type d SYSTEMFILES=`find -P / -mindepth 1 -maxdepth 1 \( -type f -o -type l \)` # -P normally default added to be shure it may happen that command defaults change. # var directory must not be done completely. A couple of directory's are excluded SYSTEMVAR=`find /var -mindepth 1 -maxdepth 1 -type d \( -wholename /var/run -o -wholename /var/tmp -o -wholename /var/lock -o -wholename /var/spool \) -prune -o -type d -print` SYSTEMVARFILES=`find -P /var -mindepth 1 -maxdepth 1 \( -type f -o -type l \)` # -P normally default added to be shure it may happen that command defaults change. echo "Backup System" # Backing up the system in one tar archive c to create P to preserve f to make archive copy. tar cPf $BACKUPDIR/$DIRDATETIME/linuxsystem.tar $SYSTEM $SYSTEMFILES $SYSTEMVAR $SYSTEMVARFILES echo "system Backup done" sleep 3 echo "Backup home directory" # I used separate file for the home dir. # to exlude some dirs I used the tar --exclude option. That's another way then like I did by system. HOMEDIR=`find $MYHOMEDIR -mindepth 1 -maxdepth 1 -type d` HOMEDIRFILES=`find -P $MYHOMEDIR -mindepth 1 -maxdepth 1 \( -type f -o -type l \)` tar cPf $BACKUPDIR/$DIRDATETIME/home.tar $HOMEDIR $HOMEDIRFILES --exclude="$MYHOMEDIR/openpli40/openpli-oe-core/build/tmp/work" echo "backup done" sleep 5 #exit
Re: Zgemma Openpli Full backup #4
Re: Zgemma Openpli Full backup #5
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users