Larry Coon
2008-01-17 16:35:35 UTC
ASE 15.0.2 on Linux.
For years we've been dumping directly to tape. We're
now changing to disk dumps, so it'll complete faster
and we'll have handy access to the last few days' dumps
(and we'll use O/S backups to save these dumps to tape).
We run backups using shell scripts initiated by cron.
With tape backups, since the media changed daily, the
dump commands never had to change. It was always:
dump database db1 to "tapedevicename" with init
dump database db2 to "tapedevicename"
dump database db3 to "tapedevicename" with unload
But now that we're dumping to disk, with multiple
nights' backups coexisting, I need to make sure it
uses different file names every night. So today's
backups would be:
dump database db1 to "/nfsmnt/asebk/db1_20080117"
dump database db2 to "/nfsmnt/asebk/db2_20080117"
dump database db3 to "/nfsmnt/asebk/db3_20080117"
And tomorrow's would be:
dump database db1 to "/nfsmnt/asebk/db1_20080118"
dump database db2 to "/nfsmnt/asebk/db2_20080118"
dump database db3 to "/nfsmnt/asebk/db3_20080118"
(Or whatever naming convention I decide on.)
My default is to do this as a two-step process:
1. Dump the database using a standard name, eg:
dump database db1 to "/nfsmnt/asebk/db1"
2. Rename the file after the dump is completed.
(Since this would be done in the shell script, I
have more flexibility.)
However, I'd rather do it in one step if I can. Is
there a clever way to dynamically specify the name of
the dump device in a dump database command? Or is
there an alternative method that others use which I
haven't thought of?
Thanks for any advice.
Larry Coon
University of California
For years we've been dumping directly to tape. We're
now changing to disk dumps, so it'll complete faster
and we'll have handy access to the last few days' dumps
(and we'll use O/S backups to save these dumps to tape).
We run backups using shell scripts initiated by cron.
With tape backups, since the media changed daily, the
dump commands never had to change. It was always:
dump database db1 to "tapedevicename" with init
dump database db2 to "tapedevicename"
dump database db3 to "tapedevicename" with unload
But now that we're dumping to disk, with multiple
nights' backups coexisting, I need to make sure it
uses different file names every night. So today's
backups would be:
dump database db1 to "/nfsmnt/asebk/db1_20080117"
dump database db2 to "/nfsmnt/asebk/db2_20080117"
dump database db3 to "/nfsmnt/asebk/db3_20080117"
And tomorrow's would be:
dump database db1 to "/nfsmnt/asebk/db1_20080118"
dump database db2 to "/nfsmnt/asebk/db2_20080118"
dump database db3 to "/nfsmnt/asebk/db3_20080118"
(Or whatever naming convention I decide on.)
My default is to do this as a two-step process:
1. Dump the database using a standard name, eg:
dump database db1 to "/nfsmnt/asebk/db1"
2. Rename the file after the dump is completed.
(Since this would be done in the shell script, I
have more flexibility.)
However, I'd rather do it in one step if I can. Is
there a clever way to dynamically specify the name of
the dump device in a dump database command? Or is
there an alternative method that others use which I
haven't thought of?
Thanks for any advice.
Larry Coon
University of California