DB Backup Script

  • i am using a very simple script to take back up of a TEST Database on production server.

    SCRIPT IS:

    use master

    backup database bharti_test

    to disk=N'E:\Reports'

    with copy_only;

    Now,,, this script is running sucessfully. but back up file is not in the desired the folder i.e. E:\Reports

    Need Help,,,, ASAP...!!!! 🙂

  • Using your script, your backup went to folder E:\ and is in file "Report"

    I think that what you want is something like:

    use master

    backup database bharti_test

    to disk=N'E:\Reports\bharti_test.bak'

    with copy_only;

  • This is exactly what i want,,, i.e. back up file to go in E: drive and in Reports file.

    And the script you provided will fail. stating,, "Its directory not found."

  • So change the path to the right one or make this folder if not exists.

  • Keep in mind the backup drive/folder is on the server and not on your workstation (assuming you run SSMS on your workstation and connect to a remote SQL Instance)

    Also as happycat allready pointed out: the backupfile is created as a file in the root "E:\" with the name "reports". It is not created as a file in the folder "E:\Reports"

    ** Don't mistake the ‘stupidity of the crowd’ for the ‘wisdom of the group’! **

Viewing 5 posts - 1 through 4 (of 4 total)

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