Help with backupsystem!

  • Hello! Iam wondering how i can make a script some wold take one tabeln in row tod do a backup in a database and save it to a device

    like A: och C: but the size should be defined to exampel 40mb or something.

    I hope for answer !

  • I think you need to explain a little more about what you are trying to do. Could you give a very simple example describing the things you are wondering about?

    /Kenneth

  • Iam trying to do a script that should take each tabels from a server and do a backup of that to another server but it would have som timestamp and se if the backup files is in exampel 10mb should it save to another devices to like CD and

    harddrive on another server.

    thank you for your answer !

  • Well, there are backups and there are backups.

    Normally a 'backup' is the entire database, which also ensures you that all stuff inside stick together in a correct way. Won't a 'normal' backup work for you?

    /Kenneth

  • I must do a script,

    I must take every tabel in the database and create like a Archive file so i can save it in another place. This backup will do a backup when its in a big size or should happend every day.

    Are you good in sql?

    if you can add me on msn to help me or if ii could mail you the code?

  • It seems a bit awkward, but.. should this script only gather the data from all tables then, so that each table's data is saved as a plain ascii file?

    This is pretty simple to do. One way is to create a cursor and just loop through all tablenames and use bcp on each table to create a file for each. Another way is to pregenerate a script for all current tables, still using bcp to pull out the data from all tables. Is it something like that you need?

    /Kenneth

  • Yes more like a arc.

    Yes i will do this on on a regular scheduled basis

    Yes the data MUST to be accessible on the archive server, or will the archive server just store the backup files olso.

    The backup will take every tabel in the database to a backup.

    The backup will happend automaticly when the files in a size f tex 40 mb..

  • I want to do a arc the its a timestamp of everythin that iam doing backup of. Do a log of everyting that is backuping on. Save it to device like dvd, cd , tape and somewhere in harddriwe. Do it with Gzip making zip files.

  • Like Johan said:

    I think you have 2 seperate issues here. One is that you need a way to look at archived data on a seperate server. Second, you need to save off backups to an alternate media. I would look into log shipping for archiving your data or use BCP as Kenneth has suggested in your other post. You will then need a secondary process that can move your backup files off to CD/DVD/Tape when they reach a certain size.

Viewing 9 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic. Login to reply