Results 1 to 9 of 9

Thread: Unofficial cheatcodes to backup and restore persistent data

Threaded View

  1. #1
    Senior Member
    Join Date
    Jan 2011
    Posts
    242

    Unofficial cheatcodes to backup and restore persistent data

    Attached are patches to /init that implement cheatcodes to backup and restore the Knoppix persistent store image inspired by ideas from utu.

    Persistent store on a USB stick or a picture card is great but these are easily lost or the file system damaged so frequent backups are a good idea. Easy, just drag and drop onto your hard drive next time you aren't running Knoppix. If that is just about never, then backup costs two reboots. The drag and drop method also requires a chunk of hard drive space the size of the persistent store, which is not always available. As utu showed, it should be possible to backup and restore persistent store using Knoppix provided you get in early enough in the boot sequence. You could boot with the debug cheatcode and do it all by hand. Instead here are a couple of cheat codes to do the job safely.

    Use:
    Code:
    knoppix backup_data=/aDevice/someDirectory/theFilename
    knoppix restore_data=/aDevice/someDirectory/theFilename
    The most usual uses might be:

    Code:
    knoppix backup_data=/dev/sda1
    knoppix restore_data=/mnt-system
    The first example might be backup to hard drive, the second to the USB stick / picture card. The first is to be preferred. You can choose where to put the backup. If you don't specify the full /aDevice/someDirectory/theFilename, the cheat code will try to fill in the missing parts from the template /mnt-system/$knoppix_dir/knoppix-data.tgz.

    The backup is reasonably straight forward though rather slow. How slow depends on how much data is in your persistent store rather than how big the store is. The result is a compressed tar file that will be a lot smaller than the persistent store itself.

    The restore has a surprise. It will first delete your current persistent store on the grounds that you probably need to restore because your persistent store is corrupt and cannot be used. This means the first you know about it is the 'you don't have a persistent store yet' screen pops up and if this takes you by surprise you won't type in the size quick enough and you'll have to press ctrl-alt-del to reboot and try again.

    Both backup and restore seem to take a unreasonably long time when compared with similar operations done from Knoppix proper. Perhaps the BusyBox version of tar and zip are unable to exploit the multi-core capabilities of modern processors.

    If you use the two cheat codes at the same time, the backup happens first. You can use this to resize your persistent store or to convert your persistent store to/from encrypted, password protected, format.

    The backup file always has the extension .tgz (aka .tar.zip) and can be unpacked with tar -xzf.
    The backup is not encrypted and is not password protected. The extension .zip is forseen for that but the implementation is left as an exercise for the reader.

    There are two attachments to this post. They are text file patches for the /init script in the sense of the (Linux) User Command patch(1). To apply them, you would have to first unpack /mnt-system/boot/syslinux/minirt.gz. See the Wiki page on remastering.

    There are two parts to the patch. The second, backup_data.txt, actually implements the new cheat codes but requires a pair of more general purpose functions implemented in the first patch, mountbypath.txt. These patches, by design, not to overlap with the (original) patch for the knoppix_data cheat code.

    Have fun.
    Attached Files Attached Files

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Electric Vacuum Cleaner Air Duster Suction High Pressure for Computer Car Home picture

Electric Vacuum Cleaner Air Duster Suction High Pressure for Computer Car Home

$9.97



Cordless Wireless Air Blower Handheld Vacuum Cleaner Strong Suction Car Home picture

Cordless Wireless Air Blower Handheld Vacuum Cleaner Strong Suction Car Home

$17.98



Compressed Air Duster with Air Blower 100000RPM Vacuum Cleaner and Air Duster picture

Compressed Air Duster with Air Blower 100000RPM Vacuum Cleaner and Air Duster

$38.99



S10-LI-144-5200 New Battery 5200mAh For ECOVACS Robot Vacuum Cleaner 4INR19/66-2 picture

S10-LI-144-5200 New Battery 5200mAh For ECOVACS Robot Vacuum Cleaner 4INR19/66-2

$34.99



Compressed Air Duster-Vacuum Keyboard Cleaner-Air Blower  picture

Compressed Air Duster-Vacuum Keyboard Cleaner-Air Blower

$19.00



Datavac PC Personal Cleaner Computer Vacuum 115 Volts of Cleaning Power Tested picture

Datavac PC Personal Cleaner Computer Vacuum 115 Volts of Cleaning Power Tested

$17.99



Mini USB Keyboard Vacuum Cleaner PC Laptop Computer Brush Dust Cleaning Kit picture

Mini USB Keyboard Vacuum Cleaner PC Laptop Computer Brush Dust Cleaning Kit

$2.99



Mini Computer Vacuum USB Keyboard Cleaner PC Laptop Brush Dust Cleaning Kit US picture

Mini Computer Vacuum USB Keyboard Cleaner PC Laptop Brush Dust Cleaning Kit US

$13.68



Electric Mini Air Duster Blower Vacuum Cleaner for PC Computer Laptop Dust picture

Electric Mini Air Duster Blower Vacuum Cleaner for PC Computer Laptop Dust

$29.40



100000RPM Cordless Air Duster Blower Compressed Computer Cleaning Vacuum Cleaner picture

100000RPM Cordless Air Duster Blower Compressed Computer Cleaning Vacuum Cleaner

$30.99