-
Notifications
You must be signed in to change notification settings - Fork 8
Servers::rebuild
Danny Li edited this page Feb 4, 2018
·
1 revision
Rebuilds a server overwriting its disk with the content of an image, thereby destroying all data on the target server.
The image can either be one you have created earlier (backup or snapshot image) or it can be a completely fresh system image provided by Hetzner.
Your server will automatically be powered off before the rebuild command executes.
Parameter | Type | Description |
---|---|---|
$id |
int | Server ID |
$image |
int/string/Image | image ID, image name or Image object |
<?php
use Exploriment\HetznerCloud;
$reset = HetznerCloud\Servers::rebuild(1, $image);
// returns the new root password
$password = $reset->getRootPassword();
/**
* returns the Action object
* @see https://github.com/Exploriment/hcloud-php/wiki/resources:-actions#action-object
*/
$action = $reset->getAction();
echo $action->getStatus();
by Exploriment.io
- README.md
-
Resources introduction
- Actions
-
Servers
::findAction
::create
::getMetrics
::rename
::start
-
::powerOn
(alias) ::reboot
-
::restart
(alias) ::reset
::shutdown
-
::stop
(alias) ::powerOff
::resetPassword
::enableRescue
::disableRescue
::createImage
::rebuild
::changeType
::enableBackups
::disableBackups
::attachIso
::detachIso
::changeDnsPtr
::changeProtection
::requestConsole
::delete
- FloatingIps
- SshKeys
- ServerTypes
- Locations
- Datacenters
- Images
- ISOs