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
  •  


Altair 8800 CPU Board Working *TESTED* reproduction picture

Altair 8800 CPU Board Working *TESTED* reproduction

$790.00



Altair MITS 8800 CPU Parts Kit not IMSAI 8080 S100 (board NOT included) picture

Altair MITS 8800 CPU Parts Kit not IMSAI 8080 S100 (board NOT included)

$69.95



IMSAI 8080A MPU-A CPU Parts Kit Not Altair MITS (board NOT included) picture

IMSAI 8080A MPU-A CPU Parts Kit Not Altair MITS (board NOT included)

$59.95



Vintage NorthStar Horizon HRAM 64k Dynamic RAM Board, S-100 IMSAI Altair picture

Vintage NorthStar Horizon HRAM 64k Dynamic RAM Board, S-100 IMSAI Altair

$125.00



MITS ALTAIR 8800  Original Vintage Microcomputer picture

MITS ALTAIR 8800 Original Vintage Microcomputer

$6000.00



MITS ALTAIR 8800  Original Vintage Microcomputer  S-100   Buy It Now $5999 picture

MITS ALTAIR 8800 Original Vintage Microcomputer S-100 Buy It Now $5999

$5999.00



1978 S-100 Bus Handbook MITS Altair Interfacing + Apple II Commodore PET TRS-80 picture

1978 S-100 Bus Handbook MITS Altair Interfacing + Apple II Commodore PET TRS-80

$48.00



Altair MITS 8800 CPU Card 8080A S-100 S100 replica IMSAI CP/M  picture

Altair MITS 8800 CPU Card 8080A S-100 S100 replica IMSAI CP/M 

$35.00



HyperWorks 2020 Suite for PC (Tool For Engineering Design, Simulation) 50Gb picture

HyperWorks 2020 Suite for PC (Tool For Engineering Design, Simulation) 50Gb

$72.87



VINTAGE DEC 1975 VOL 1 ISSUE 1 SCCS INTERFACE MAGAZINE MITS ALTAIR COVER & ADS picture

VINTAGE DEC 1975 VOL 1 ISSUE 1 SCCS INTERFACE MAGAZINE MITS ALTAIR COVER & ADS

$358.99