In remembrance of one of my math teachers back at school who always said KISS (Keep It Simple Stupid)  I made a very simple and quick backup script for a SharePoint portal at a customer test farm. When scheduled right it makes a backup, lets say, every hour and renames older backup files.

CD\
CD BACKUP

IF NOT EXIST backup11.dat GOTO make11
 echo Y | del backup11.dat

:make11
IF NOT EXIST backup10.dat GOTO make10
 RENAME backup10.dat backup11.dat

[...]

:make2
IF NOT EXIST backup1.dat GOTO make1
 RENAME backup1.dat backup2.dat

:make1
IF NOT EXIST backup.dat GOTO make0
 RENAME backup.dat backup1.dat

:make0
“C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe” -o backup -url
http://moss.example.com -filename C:\Backup\backup.dat -overwrite

EXIT

  • Share/Save/Bookmark

Tags: ,

Free wordpress layouts | Free drupal skins | Free joomla skins | Mediawiki skins | Free pligg themes | Review template providers" | Customizable Website Templates |

2 Responses to “Just a very simple backup script”

  1. Can this also be done by using Powershell?

  2. Hello Carl

    Thanks for your comment. I don’t know if it can be done in Powershell but it is interesting to look into. I shall try to write a Powershell script for this task. Good point.

Leave a Reply

You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>