Archiving a large backup across multiple discs on Linux Rumi, September 6, 2019 We have two options (as we obviously don’t want to delete our data!) Use a different backup medium Split the backup across multiple volumes Sometimes the former just isn’t appropriate, as much because of the cost of harddrives vs Optical Media (i.e. CD’s/DVD’s). This short tutorial will explain how to create a single backup archive, and then split it across multiple CD’s/DVD’s. In this tutorial, I want to backup to DVD (as my photo collection would require more than 40 CD’s). So from BASH; tar -cf Pictures_backup.tar Pictures/ split -d -b 4480m Pictures.backup.tar This will then give you multiple files to burn to disc (each beginning with x). Burn these files with your favourite CD Burner. To restore the files, copy them all to one directory and then run the following cat * > Pictures_backup.tar tar xvf Pictures_backup.tar Notes You can also create and split the archive in a single line, by piping tar through split. If you have the harddrive space and are disciplined enough to actually burn the files off regularly, you can write a fairly simple BASH script to call from your crontab; #!/bin/bash # Set where you want the Backup files to be stored BACKUP_DIR="/var/tmp/" cd /home/$USER/ tar -cf Pictures_backup.tar Pictures/ | split -d -b 4480m - Pictures_backup_$(date +%Y%m%d).tar mv Pictures_backup_$(date +%Y%m%d).tar* $BACKUP_DIR Whichever route you take around creating the split files, if you are wanting to split across CD’s you need to alter the split command. In place of 4480m simply enter 680m. Related Scripts BackupSplit
Proxmox VM auto start VM after found in shutdown state July 30, 2021July 30, 2021 I was having this strange issue, where a running busy VM stopeed all of a sudden due to high CPU or Memory overload issue. So manually had to start everythime. In order to avoid this, created a small script to start the VM in case if it’s down. #!/bin/bash #… Read More
Sticky header and footer CSS July 24, 2013 HTML Code- <!– BEGIN: Sticky Header –> <div id="header_container"> <div id="header"> Header Content </div> </div> <!– END: Sticky Header –> <!– BEGIN: Page Content –> <div id="container"> <div id="content"> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc sit amet ipsum magna, et convallis sem. Nunc pulvinar magna vitae orci… Read More
Show all images in a folder with PHP September 11, 2010 <?php //Your folder $files = glob(“icons/*.*”); $colCnt=0; echo ‘<table border=”0″ style=”width:590px;”>’; for ($i=1; $i<count($files); $i++) { $colCnt++; if ($colCnt==1) echo ‘<tr>’; echo ‘<td width=”25%” style=”font-size:8.5px; font-family:arial”>’; $num = $files[$i]; echo ‘<img src=”‘.$num.'” align=”absmiddle” /> ‘; print substr(substr($num,6,100),0,-4); echo ‘</td>’; if ($colCnt==4) { echo ‘</tr>’; $colCnt=0; } } echo ‘</table>’; ?>… Read More