Taking a backup copy of a directory

October 23rd, 2007

I was just trying to copy a directory full of data, to put to one side, because I knew it would be overwritten when I did an install and I wanted to keep a copy to move back into place after the install. The trouble was that the permissions within the directory hierarchy were complex and no matter who I logged on as - even Administrator - Windows Explorer only got so far in the copy operation before it complained about not having access to something at which point it would just stop.

In UNIX you can use the God-like power of the root user to overcome this problem, but in Windows Administrator is bound by permissions like everyone else.

The solution is to use the Windows Backup utility. This saves a backup of the directory of your choice and doesn't care about permissions because, when you restore the directory, the permissions and file ownership you get are identical to what you had before. There's no way to change this, so security isn't compromised by taking the backup.

So if you just want to preserve something against possible overwriting, use the Backup utility. On XP this is usually at: Start > Programs > Accessories > System Tools > Backup.

Leave a comment