Restores a database from a backup or transaction log records. This includes full database restores, transaction log restores, and database file restores. This cmdlet is modeled after the Microsoft. The parameters on this cmdlet generally correspond to properties on the Smo.
These can be set by means of the attr command, displayed with the displayattr command, and deleted by the deleteattr command. There are global attributes that are used by all devices and local attributes that apply to individual device classes only.
See the documentation of the attr command for examples. Be careful not to overwrite additional global attributes previously defined by yourself or a device. Device specific attributes Device specific attributes are documented in the corresponding device section.
The value of this attribute consists of a list of space separated values, each value is a colon separated pair. You can specify a widgetOverride after an additional colon e. The second part usr is the other direction, if the user specified open 10, the device will receive on On both occasions the key will be first compared directly with the text, and if it is not equal, then it will be tried to match it as a regexp.
When using regexps in the usr part with wildcards, the fw part must be filled with the exact same keys to enable a correct display in the FHEMWEB set dropdown list in the detail view.
Currently the following values are supported: This is used to further group devices together. A device can appear in more than one group, in this case the groups have to be specified comma-separated.
If this attribute is not set then the device type is used as the grouping attribute. A device can appear in more than one room, in this case the rooms have to be specified comma-separated.
Only necessary in exceptional cases. The value for the global device is a default for other devices without own verbose attribute set.
Check the module's attribute list if you want to know if a device supports these attributes. If not set, its value is taken from the state reading. If set, then every word in the argument is replaced by the value of the reading if such a reading for the current device exists.
This attribute is evaluated each time a reading is updated. The "set magic" described here is also applied. The attribute takes a comma-separated list of readings. You may use regular expressions in that list.
If set, only updates of the listed readings create events. If set, only changes of the listed readings create events.Restore specific files or filegroups to a database (a file restore). With the REPLACE option, restore allows you to overwrite an existing database with whatever database is in the backup set, even if the specified database name differs from the database name recorded in the backup set.
This can result in accidentally overwriting a database. With INIT means scratching the backup in the file and adding a new one. So the file remains, but the backup in the file is new.
You could for example run 7 schedules, one for each weekday, and use with init. would give you a weekly rollover of your heartoftexashop.coms: 6. I have to restore around 60 SQL databases of different sizes.
I googled to find a script to restore all databases after each other, just picking it 1 by 1 from my folder. The commands attr, deleteattr, displayattr, delete, get, list, set, setreading, setstate, trigger can take a more complex device specification as argument, which will be expanded to a list of devices.
A device specification (short devspec) can be: a single device name. This is the most common case. a list of devices, separated by comma (,). If another database already exists that uses the same file names you are trying to restore and the database is online the restore will fail. But if the database is not online for some reason and the files are not open, the restore will overwrite these files if you do not use the WITH MOVE option, so be careful you do not accidently overwrite.
How to backup and restore a database to a different location and name via command line only up vote 2 down vote favorite I have a database that I want to copy from one location to another (maybe even to a different computer) via the command line only.