copyto questions

dwjongbloeddwjongbloed Posts: 30
edited March 29, 2015 11:52AM in SQL Backup Previous Versions
Just wondering if you can use the copyto function to copy to a USB external drive rather than another server? Some of the sites that I have have slow wan connections so it would take a while for the copyto function to work.

Comments

  • peteypetey Posts: 2,358 New member
    Yes, you can use the COPYTO option to copy the backup files to any location that is accessible by the SQL Backup Agent service.

    COPYTO by default will copy the backup files as part of the backup job. This means that the backup job completes only after the file has been copied over to the specified destination(s).

    For transaction log backups, the copying process is performed by a separate process. This means that the backup job completes once the transaction log has been backed up. Details of the file are placed in a queue, and an independent process looks at this 'copy' queue and attempts to copy the files to their intended destination(s) at periodic intervals.

    You can force SQL Backup to place full or differential backup files in the 'copy' queue by using the USEQUEUEDCOPY option e.g.
    EXEC master..sqlbackup '-sql "BACKUP DATABASES [db1, db2, db3] TO DISK = [<AUTO>] WITH COPYTO = [\remotesharesqlbackups], USEQUEUEDCOPY"'
    
    Peter Yeoh
    SQL Backup Consultant Developer
    Associate, Yohz Software
    Beyond compression - SQL Backup goodies under the hood, updated for version 8
Sign In or Register to comment.