Difference between revisions of "Backup Procedures"

From 24PinTech Wiki
Jump to navigation Jump to search
Line 14: Line 14:


===Automated Backups===
===Automated Backups===
The following command will create a Task Scheduler task named '''''WeeklySystemStateBackup''''' that runs every Saturday ( '''''SAT''''' ) at '''''19:00 (7 pm).''''' This task will run ''WEEKLY'' with the ''HIGHEST'' privileges. It will run the Windows Server Backup CLI to backup ''SYSTEMSTATEBACKUP'' to target volume "E" (Volume E is a physical hard drive in the back on the classroom called "my passport")  
The following command will create a Task Scheduler task named '''''WeeklySystemStateBackup''''' that runs every Saturday ( '''''SAT''''' ) at '''''19:00 (7 pm).''''' This task will run ''WEEKLY'' with the ''HIGHEST'' privileges. It will run the Windows Server Backup CLI to backup ''SYSTEMSTATEBACKUP'' to target volume "E" (Volume E is a physical hard drive in the back on the server called "my passport")  
  Schtasks /Create /SC weekly /D SAT /TN WeeklySystemsStateBackup /ST 19:00 /TR “wbadmin start systemstatebackup -backupTarget: E:”
  Schtasks /Create /SC weekly /D SAT /TN WeeklySystemsStateBackup /ST 19:00 /TR “wbadmin start systemstatebackup -backupTarget: E:”
This can also be ran manually via the task scheduler.  
This can also be ran manually via the task scheduler.  

Revision as of 19:47, 24 January 2022

How to back up Odin (10.21.25.3) and Friia (10.21.25.4) manually

This is how we back up our two Windows servers to an external drive.

  1. Get the external drive labelled "server backups" from the middle drawer on the left of chamberlains desk.
  2. Take the drive into the back room and remove the guard on the server labelled Valhalla and plug the drive into the right usb port.
  3. On a computer in the classroom use chrome and type "10.21.25.2" into the address bar. The log in for esxi is the same for your log in for class. (Server Admin accounts only)
  4. Go to virtual machines and click on "Odin" click on "Edit" and click on "Add other device" and then "USB device" select Western Digital My Passport 25E2. Press save and click on the window of the virtual machine to be taken to Odins desktop.
  5. Click on "Actions" and then "Guest OS" "Send Keys" and "ctrl-alt-del" and log in using your profile in class. (Server Admin accounts only)
  6. Use the start menu and type "Windows Server Backup" open it.
  7. The Snap-in on the left has the option to to perform "Local Backup" the snap in on the right has an option to backup select it and go through the menu that pops up and select the following options "Backup Once, Different options, Full server, local drive select "my passport" and hit backup.
  8. After backup is finished go back to 10.21.25.2 and click on Odin then "Edit" and press the small x next to the hard drive. Put the hard drive in chamberlains desk when you are finished.
  9. For Friia do the exact same process.

Automated Backups

The following command will create a Task Scheduler task named WeeklySystemStateBackup that runs every Saturday ( SAT ) at 19:00 (7 pm). This task will run WEEKLY with the HIGHEST privileges. It will run the Windows Server Backup CLI to backup SYSTEMSTATEBACKUP to target volume "E" (Volume E is a physical hard drive in the back on the server called "my passport")

Schtasks /Create /SC weekly /D SAT /TN WeeklySystemsStateBackup /ST 19:00 /TR “wbadmin start systemstatebackup -backupTarget: E:”

This can also be ran manually via the task scheduler.

Restore Windows Server Backup on ESXi

The following process was used to restore a backup of our production server Odin which is a active directory server with DNS, DHCP, Print, and other services. In the process you will have to use DRSM (Directory Service Restore Mode) if you are trying to restore a server running Active Directory because if you try in normal Windows mode you'll encounter an error. The restored version of the VM may encounter some errors you may have to fix but it should sort itself out. This may be just because you are restoring an older machine so whatever it's running that's synced may get confused. The following steps guide you through this process:

  1. Grab a backup of the Windows Server you are trying to restore
  2. Go to one of our ESXi machines and create a new VM with the necessary requirements for the machine you want to restore. In our case we are trying to restore a Windows Server 2019 Domain Controller so we gave it 100 GB of storage, 4 CPUs, and 8 GB of memory.
  3. Do basic setup of the machine and once it is installed you want to add the Windows Server Backup Feature
  4. Once done you have to boot the Server back into Directory Service Restore Mode (A type of safe mode.) To do this run msconfig by either right clicking the start menu or doing Win+R.
  5. Go over to the Boot Tab and check the following two checks, Safe mode and DSRM (Directory Service Restore Mode.) Follow the prompt and restart the computer.
  6. Once the computer has booted into DRSM open Windows Server Backup and run the restore command.
  7. Follow the prompts depending on where your backup is stored and what server you are trying to restore.
  8. When asked what files you want to restore, do System State if you are trying to restore an entire machine or one of the other options if you are trying to restore certain files.
  9. Go ahead and check the Active Directory Replication check mark and continue on.
  10. The restoration process should start and once done the computer will have to restart, it will restart into DRSM. You’ll have to go back into msconfig and uncheck the safe mode option and restart the computer again.
  11. The computer should reboot into the restored version of the machine, there may be some errors or active directory issues but those should sort themselves out. This is just because you are restoring an older version of a machine and the active directory is confused.  

How to back up Logan_Web (10.21.25.11) Manually

Step One; The first and most essential step to backing up Logan_Web onto the Fog server is to register it to the Fog server itself, in order to be able to perform the process. If not already completed, this can be performed by doing a full host registration. Begin this by logging into the Fog server (http://10.21.25.29/fog) and selecting the 'Images' tab. Create a new image, and name it accordingly to what is required. Once completed, you're going to find Logan and select it. Before booting into the device, make sure to head into the 'Actions' tab near the top and choose to Edit settings. On the first tab, the Virtual Hardware, make sure that the ability to connect with the NIC is available; as this is how we'll be PXI booting. Then, head into the VM settings and expand the 'Boot Options' category. Scroll for just a moment and select the option to force the device to boot into BIOS. Once accomplished, go into the boot settings of the BIOS and move 'Ethernet' to the top of the list. Continue the booting process, and do not forget to rearrange the Boot Order at a later date. Once you are prompted with a menu, select 'Full Host Registration'

Hostname: Dev_Logan

logging into the Fog server (http://10.21.25.29/fog) and selecting the 'Hosts' tab. Search this list of servers for 'dev_logan', as this is the server we're going to be backing up. Select the 'Capture' option on 'dev_logan', and once completed, the next time that Logan is PXI booted through ethernet it'll be automatically pulled and backed up.

Step Two; Once this request to pull the image from Logan has gone through, the next step is to boot into Logan to perform the backup. Head to https://10.21.25.8/ui/#/login and logon to the ESXi device. Once completed, you're going to find Logan again and select it. Before booting into the device, make sure to head into the 'Actions' tab near the top and choose to Edit settings. On the first tab, the Virtual Hardware, make sure that the ability to connect with the NIC is available; as this is how we'll be PXI booting. Then, head into the VM settings and expand the 'Boot Options' category. Scroll for just a moment and select the option to force the device to boot into BIOS.

Step Three; When ready

Step Two; Once the request has been sent over and has gone through, you'll need to pull the image from the Fog server onto Logan. This can be done by 'Pxi Booting', as in, taking it off of the network by booting from Ethernet. By doing this, you'll be initiating the booting process in such a way that the image will begin its installation. You can 'Pxi Boot' a system by going into the boot menu while the device is starting up, and selecting the Ethernet option. The actual process of this may be more complicated, and you can get more insight into it *here*. (Possibly hyperlink to another article if existing, if not then write a short section on it here.)

Step Three; Coming to the end now, the final step in your process will be to store the image you've just used in the UnRAID Server, for future usage and documentation. This can be done by first logging into the UnRAID server and then navigating your way to

Step Four; Verify full system functionality as any good technician in 24PinTech should, and then your task should be complete.

How to back up Logan_Web (10.21.25.11) automatically DO NOT PREFORM THIS IT WILL BREAK THE SHARE

we use a program called rsync and to use rsync we first need ssh rsa authentication for rsync to work to do that follow this process here

Old manual back up procedures

Server Backup (manually)