SourceFiles.org - Use the Source, Luke
Home | Register | News | Forums | Guide | MyLinks | Bookmark

Related Sites

Latest News
  General News
  Reviews
  Press Releases
  Software
  Hardware
  Security
  Tutorials
  Off Topic


Back to files
*                               README                                  *
*               swpartc-0.1.1.devel     09 February 2006                *

README

swpartc is a GPL licensed free software and is Copyright (C) 2006 by George Kabisioulis. Please report any comments or bugs to: george.kabi@users.sourceforge.net.
The official Web site is:
http://swpartc.sourceforge.org/

swpartc is a simple but reliable utility to copy the data contents of one file or partition into another one and vice versa without losing a bit. The partitions of course must be of the same size otherwise nothing can be done.

swpartc hopes to be reliable because it comes with a crash-recovery system. This is achieved through the use of a back-up file which stores, during the swapping operation, the progress status and the last two data blocks before commencing changes in the original files. Unfortunately my technique proved to be a bit complicated and not very safe. During my tests swpartc completed successfully even in cases of many repeatedly crashes(kills).
A fault may arise when the process-system crashes for 3 consecutive times (it may happen with only two but it usually works) while retrieving from the backup-file (that happens in the start of a resume operation). But this is propably unlikely to happen in real life (or maybe not?) except when someone kills the process continuously just for the fun. So don't play with it, just let it finish the job.

swpartc is designed to always operate in non−interactive mode. So it would be applicable to use it in a shell script, partition manager tool or any other IFI tool.

EXAMPLE OF USAGE

Suppose you want to rearrange the placement of some partitions in one or more of your hard disks. The most usual way is to save somewhere a partition image in order to delete that partition, move another one in the unallocated space and then copy the image again inside the free space you now have in your HD and repeat these actions with the other partitions until you are done. But if you are lacking enough free storage space to save a partition image you can do a temporary resize (if neccessary) in the smaller of the two partitions to make their sizes identical. You can use an fdisk or partition manager utility but itâ€TMs not necessary to resize the containing filesystem. Now since both partitions are of the same size just swap them with swpartc. After completion you can resize the smaller partition, which is now in the place where the larger one used to be, in itâ€TMs original size (BE CAREFULL: Donâ€TMt truncate the larger partition). If the partitions swapped contain different filesystem then you must also change the filesystem types in the MBR of the hard disk (use an fdisk util for that).

You can also swap regular files or a partition with a file (which will actually contain a partition image saved by `dd` or a similar utility). Even whole hard disks can be swapped although I havenâ€TMt yet tested that (Iâ€TMd like to know if this works properly, please mail me).

INSTALLATION

Yet another GNU build system (./configure && make && make install).

See INSTALL for details.


Other Sites

Discussion Groups
  Beginners
  Distributions
  Networking / Security
  Software
  PDAs

About | FAQ | Privacy | Awards | Contact
Comments to the webmaster are welcome.
Copyright 2006 Sourcefiles.org All rights reserved.