Setting up backup to external HDD using Bareos for Windows 10

Lyrical introduction

Until recently, I used the standard Windows 10 operating system "File history" to back up critical data. Periodically, data from a stationary PC was saved to an external HDD connected via a USB interface, which suited me perfectly and calmed my psyche.





One Saturday morning I was puzzled by the question: "Can I restore my data to another system?" A laptop with Windows 10 system was chosen as the subject. After a big little dance with a tambourine, the data was recovered, but an unpleasant surprise was that when comparing the number of folders and files, a discrepancy was found. This fact saddened me and prompted me to approach the issue of organizing data backup more responsibly. After a short search on the Internet, my choice fell on the Open Source Bareos system. The process of setting up the system was not simple and intuitive for me; a considerable amount of time was spent. Human memory has an excellent ability to forget information, which prompted me to compose a "cheat sheet" for the future,which I hasten to share with you.





Description of the task

On a Windows 10 x64 desktop PC, the "test" project directory is located on the local DATA (D :) drive. It is necessary to organize a backup of all files of the above project to an external HDD - BACKUP (E :), except for the "target" subdirectories.





The development of the project is carried out on weekdays, so copying is done automatically according to the schedule:





  • full - on Fridays at 18:30;





  • incremental - from Monday to Thursday at 18:30.





On the computer on the local drive C: Bareos version 19.2.7 x64 is installed. The installation was made "by default" (we agree with everything and click "next"), the installation type is "Full SQLite":





Let's do the following in order.





Where?

"" ("Device") C:\ProgramData\Bareos\bareos-sd.d\device\RemoteStorage.conf:





Device {
  #  , 
  Name = RemoteDevice                
  #  ,  
  Media Type = File              
  #   ,   
  Archive Device = E:/           
  #    
  LabelMedia = yes;                  
  #   
  Random Access = yes;                
  #    
  AutomaticMount = yes;          
  #      
  RemovableMedia = yes;          
}
      
      



"" ("Storage"), Device, C:\ProgramData\Bareos\bareos-dir.d\storage\Remote.conf:





Storage {
  #  ,  
  Name = Remote                      
  #   IP , 
  Address = localhost                
  #     Storage-, 
  #   C:\ProgramData\Bareos\bareos-sd.d\director\bareos-dir.conf
  Password = "TFso/Fr6YDeuei/QYtg2bDLaS9dDkMgRvSPefKr88FnR" 
  #    Device, 
  Device = RemoteDevice
  #  ,       Device, 
  Media Type = File
}
      
      



"" ("Pool") C:\ProgramData\Bareos\bareos-dir.d\pool\TestFull.conf:





Pool {
  #  , 
  Name = TestFull
  #    
  Recycle = yes                       
  #   
  AutoPrune = yes          
  #     
  Volume Retention = 365 days         
  #   
  Maximum Volume Bytes = 50G    
  #   
  Maximum Volumes = 100               
  #     "TestFull-<id->"
  Label Format = "TestFull-"          
}
      
      



"" ("Pool") C:\ProgramData\Bareos\bareos-dir.d\pool\TestIncr.conf:





Pool {
  #  , 
  Name = TestIncr
  #    
  Recycle = yes                       
  #   
  AutoPrune = yes          
  #     
  Volume Retention = 30 days         
  #   
  Maximum Volume Bytes = 1G    
  #   
  Maximum Volumes = 100               
  #     "TestIncr-<id->"
  Label Format = "TestIncr-"          
}
      
      



?

" " ("FileSet") C:\ProgramData\Bareos\bareos-dir.d\fileset\TestFileSet.conf:





FileSet {
  #   , 
  Name = "TestFileSet"
  #   
  Include {
	  Options {
	    Signature = MD5         # ,   
	    WildDir = "*target"     #    
	    Exclude = yes           #    
    }
    File = "D:/test"          # ,  
  }
}
      
      



?

"" ("Schedule") C:\ProgramData\Bareos\bareos-dir.d\schedule\TestSchedule.conf:





Schedule {
  #  , 
  Name = "TestSchedule"
  #  ,     
  Run = Level=Full Pool=TestFull fri at 18:30
  #  ,       
  Run = Level=Incremental Pool=TestIncr mon-thu at 18:30
}
      
      



? ?

"" ("Job") C:\ProgramData\Bareos\bareos-dir.d\job\backupTest.conf:





Job {
  #  , 
  Name = "backupTest"
  #   File-
  Client = "bareos-fd"
  #  
  FileSet = "TestFileSet"
  #   Message-, 
  Messages = "Standard"
  # , 
  Pool = "TestFull"
  # 
  Schedule = "TestSchedule"
  # 
  Storage = "Remote"
  # , 
  Type = "Backup"
  #     
  Write Bootstrap = "E:/%c.bsr"
}
      
      



Bareos, :





  • Bareos Storage Service ("Bareos-sd");





  • Bareos Director Service ("Bareos-dir").





"backupTest" , . Bareos http://127.0.0.1:9100/ (: admin, : admin). "" ("Schedules") " " ("Status schedules") , .





"" ("Jobs") "" ("Run"). "" ("Job") "backupTest". "" ("Level") "Full" , "Submit".





. "" ("Level") "Incremental", "" ("Pool") - "TestIncr".





"" ("Dashboard"):





Go to the "Restore" section on the "Restore multiple files" tab. In the "Client" field, select the "bareos-fd" value. In the "Backup jobs" field, select the desired restore point. In the "Merge all clients filesets" field, select the "No" value. In the "Restore location on client" field, specify where to restore the data ("D: / test_restore") and start the restore by clicking "Restore".








All Articles