Enhancing Window’s tiny backup program

Veröffentlicht von am Okt 12, 2007 in Allgemein | 2 Kommentare

Recently I had to implement a backup strategy on a windows server and the only available software option was windows’ built-in backup program ntbackup. Unfortunatly it’s name really exposes its technological niveau:

  • It is not possible to store the individual backup files next to each other. All backups are stored in one single file (don’t think about the consequences of a single read error when opening the file) or one backup replaces the previous backup with the same file name.
  • It’s not possible to define any measures to manage the space on the backup media an remove older backups depending on their age or the used space on the backup media.
  • It is not  possible to define a sophisticated backup policy: only full OR incremental OR differential backups are possible.
  • ...

So I decided to install Perl (because Perl is my scripting language of choice) on the server and write a small script that does exactly that. It renames the backup file (originally named backup.bkf) and appends the timestamp to the file name. It also observes the free space on the backup media and deletes the oldest backups so that a certain amount of disk space is assured for the next backup run. To keep the script simple the path to the backup folder, the available disk space and the required free disk space (depending on the size of one backup file). I run this script as a "planned task" one hour before the ntbackup task will run. Its working without problems on a server for about 6 months.

AnhangGröße
update-backups.pl1.36 KB

flattr this!

2 Kommentare

  1. Dirk
    10. November 2007

    If the backup media is a removable drive (e.g. an USB disk) and is not  allways connected with the computer it is possible that the drive letter changes. That might happen if you attach another pen drive meanwhile. Then the USB drive might be drive F: instead of E: (as it was sofar). You can fix this by assigning a drive letter that might be valid "for ever". Use the disk management utilities and assign letter "z:" for the USB drive. Windows will try to assign this letter when ever it detects the drive.

    Antworten
  2. Dirk
    10. November 2007

    I spent 50€ and bought Acronis True Image Backup Home for a customer. It took me 3 hours to implement a bullet proofed backup policy (mirrored partitions on the hard disk, installation of a  boot loader with restore facilities, defining and testing a backup strategy with daily backups to an USB drive), but now I think she has a solid infrastructure. The backup software cares for the space on the backup media, removes old backups, if backup space decreases, runs a mix of full and differential backups to leverage disk space consumption and security demands. I would use it myself as well, if I had a Windows box to care for.

    Antworten

Hinterlasse eine Antwort