DSL Tips and Tricks :: DSL based BACKUP/RESTORE solution



Wow, 800 views.  Glad to see this is getting some use!

If anyone has any further customizations, feel free to add them in here.

This is a very interesting script!

One thing to suggest is that in Option 3, you mention that backing up at this point will not allow you to use the fluxbox menu icon to backup.  You could add in an option to use sed to remove the line that starts the backup from ~/.fluxbox/menu, if it exists.  For example:

Code Sample

BACKUP_MENU_ENTRY=`grep "BACKUP SYSTEM" /hda1/home/dsl/.fluxbox/menu`
sed -e 's/"$BACKUP_MENU_ENTRY"//'


I'm not a very proficient coder so this might not work/this might cause other problems, but I think it will work.

Similarly, you could add the option to exclude certain files from the backup.  For instance, a user might not want to back up their videos.  You could do this by replacing the tar command with:

Code Sample

find /hda1 > /tmp/files_to_backup.lst
echo "Please enter each file or folder you don't wish to backup on a separate line, ending with "EOF"."
cat << EOF > /tmp/files_to_avoid.lst
tar -C /hda1 -T /tmp/files_to_backup.lst -X /tmp/files_to_avoid.lst zxvpsf hda3/hda1backup.tar.gz


Those are some simple (maybe erroneous) suggestions that I think might help the script.

At the top of the script:

sudo cp /boot/grub/menu.lst_backupmode /boot/grub/menu.lst

Where were _backupmode files created?

Quote (jpeters @ Aug. 14 2007,03:41)
At the top of the script:

sudo cp /boot/grub/menu.lst_backupmode /boot/grub/menu.lst

Where were _backupmode files created?

If memory serves, those files were kept in the /boot/grub folder of the first installation.  the point being that grub is pointed to /boot/grub/menu.lst on hda1.

menu.lst_backupmode is a modified copy of menu.lst that puts the 2nd install as the first boot option in the grub menu.

Quote (CyberCod @ Sep. 07 2007,19:52)
If memory serves, those files were kept in the /boot/grub folder of the first installation

menu.lst_backupmode is a modified copy of menu.lst that puts the 2nd install as the first boot option in the grub menu.

There aren't any menu.lst_backupmode files in any of my grub installations.

Next Page...
original here.