restore - Delphijustin industries https://delphijustin.biz Making use out of things! Mon, 30 Sep 2019 15:26:21 +0000 en-US hourly 1 https://wordpress.org/?v=6.2.9 https://delphijustin.biz/wp-content/uploads/2025/10/cropped-dongwa-192-32x32.png restore - Delphijustin industries https://delphijustin.biz 32 32 LiveBackup – live linux backup tool https://delphijustin.biz/livebackup-live-linux-backup-tool/?utm_source=rss&utm_medium=rss&utm_campaign=livebackup-live-linux-backup-tool https://delphijustin.biz/livebackup-live-linux-backup-tool/#comments Thu, 26 Sep 2019 19:36:31 +0000 https://delphijustin.biz/?p=675 This tiny shell script will allow you to backup the settings and programs from a live linux session to two .tar files. Here’s a list of the tar files and what they do. config/data.tar – Configuration and settings files. (/var and /usr directories) if any of the files in data.tar exists it will be overwritten. …

The post LiveBackup – live linux backup tool first appeared on Delphijustin industries.

]]>
This tiny shell script will allow you to backup the settings and programs from a live linux session to two .tar files. Here’s a list of the tar files and what they do.

  • config/data.tar – Configuration and settings files. (/var and /usr directories) if any of the files in data.tar exists it will be overwritten.
  • config/system.tar – Programs and other settings. Any existing file will not be overwritten. This prevents crashing the system after untaring the archive.

Here’s the source code for the two scripts are listed below. No download needed just use a text editor and save them as a *.sh file.

#!/bin/sh
#load.sh file
echo Heres a list of the operations and error codes, 0 = success>config/load.log
if [ -z $1 ]
then
xterm -e ./load.sh xterm
else
echo ----- data.tar   -----
sudo tar -xvf config/data.tar -C /
echo data.tar $?>>config/load.log
echo ----- system.tar -----
sudo tar -xvf config/system.tar -C / --skip-old-files
echo system.tar $?>>config/load.log
#Add service load commands after this line
#web server
hiawatha
echo hiawatha $?>>config/load.log
jwm -restart
fi
#!/bin/sh
#save.sh file
mkdir config
echo Heres a list of the operations and error codes, 0 = success>config/save.log
if [ -z $1 ]
then
xterm -e ./save.sh xterm
else
echo ---- data.tar     ----
rm config/data.tar
tar -rvf config/data.tar /etc
echo /etc $?>>config/save.log
tar -rvf config/data.tar /var
echo /var $?>>config/save.log
tar -rvf config/data.tar ~
echo home dir $?>>config/save.log
echo ---- system.tar   ----
rm config/system.tar
tar -rvf config/system.tar /usr
echo system.tar $?>>config/save.log
xedit config/save.log
fi

The post LiveBackup – live linux backup tool first appeared on Delphijustin industries.

]]>
https://delphijustin.biz/livebackup-live-linux-backup-tool/feed/ 1