Difference between revisions of "Backup on Windows"

From ITSwiki
Jump to: navigation, search
[unchecked revision][unchecked revision]
 
(42 intermediate revisions by 4 users not shown)
Line 1: Line 1:
This howto describes how to back up data stored locally on Windows PC's (desk- and laptops).
+
<div style="background-color: #FFFF00; border-style: dotted;"> This guide is for users at '''DTU Compute''' only</div>
  
For a description of the general principles and ideas about the IMM back up program please refer to this [[Desk- and laptop backup | link]].
+
 
 +
This howto describes how to back up data stored locally on Windows PC's (desk- and laptops).
  
 
For a description of the general backup concepts please refer to this [[Backup | link]].
 
For a description of the general backup concepts please refer to this [[Backup | link]].
  
The information found on this page is specific for windows pc's. Linux, Mac or other *NIX PC users should refer to the 'rzyncbackup' guide found [[Backup from Linux | here]].
+
The information found on this page is specific for windows PC's. Linux, Mac or other *NIX PC users should refer to the 'rzyncbackup' guide found [[Backup on Linux / OSX | here]].
  
==General information about the immbackup program==
+
==General information about the DTU Compute backup program==
  
This backup program is run the first time each day a Windows user logs on to the Windows domain. Therefore remember to logout when you leave IMM. IMMbackup may also be run on demand. For this setup please contact [mailto:itsupport@imm.dtu.dk ITSupport ]
+
This backup program is run the first time each day a Windows user logs on to the Windows domain. Therefore remember to logout when you leave DTU Compute. DTU Compute backup may also be run on demand. For this setup please contact [mailto:itsupport@imm.dtu.dk ITSupport ]. Please note, that your laptop/PC must be connected to the cabled network at DTU Compute (not wireless) and your laptop/PC must be registered by ITS.
  
The program is especially useful for Notebook users that can not use our file servers for general storage of data, but need local copies when they are outside IMM.
+
The program is especially useful for Notebook users that can not use our file servers for general storage of data, but need local copies when they are outside DTU Compute.
  
 
===Customization===
 
===Customization===
  
As default the backup program uses a server side initialisation file for defining the files and directories to backup. The program can be customized to special needs by copying this [[media:13-immbackup.ini | ]]
+
As default the backup program uses a server side initialization file for defining the files and directories to backup. The program can be customized to special needs, see below under ''''How to''''. Per default '''Documents''', '''Desktop''' plus various "settings directories" are being backed up (Internet Explorer bookmarks, Firefox settings, etc.).
  
 
===Technique===
 
===Technique===
Line 23: Line 24:
 
===To check what has been backed up===
 
===To check what has been backed up===
  
The files are backup to the share '''\\nas1.imm.dtu.dk\backups''' under ''username'' -&gt; ''machine name ''. The structure is rather self-explaining.
+
The files are backup to the share '''\\nas1.compute.dtu.dk\backups''' under ''username'' -&gt; ''machine name ''. The structure is rather self-explaining.
  
 
Note: please do '''not''' manually write to this share - files here should only be written by the immbackup utility.
 
Note: please do '''not''' manually write to this share - files here should only be written by the immbackup utility.
Line 29: Line 30:
 
==How to==
 
==How to==
  
NB: Throughout this section we refer to localusername which is the logon name on the local PC; type echo %username% in a command prompt to obtain it.
+
 
  
 
===...make sure that a backup is performed===
 
===...make sure that a backup is performed===
  
====For users is logging on to an WIN domain account====
+
Whenever the user log on to the PC/notebook and the PC is attached to the DTU Compute network immbackup will be executed. However, if the user already logged on earlier the same day no backup will be performed, i.e. at most one backup per day. If an extra backup is desired, run immbackup.exe manually without any arguments. Do this by going to '''\\nas1.compute.dtu.dk\util''' and finding the '''immbackup.exe''' and run it.
  
Whenever the user log on to the PC/notebook and the PC is attached to the IMM network immbackup will be executed. However, if the user already logged on earlier the same day no backup will be performed, i.e. at most one backup per day. If an extra backup is desired, run immbackup.exe manually without any arguments.
+
===...run backup when not at DTU===
 +
[One time only] Start a VPN connection. Next press '''Windows r'''. Type '''\\nas1.compute.dtu.dk'''. Go to the folder '''util''' and find the program '''immbackup-vpn.bat''' and copy it to the desktop<br>
 +
[Daily] Start the VPN connection. [Preferable] close down most programs with open files. Run the '''immbackup-vpn.bat''' on your desktop simply by double click on it.
  
====User is not logging on to an WIN domain account====
+
Hints: Best to run the command with all programs closed because open files can not be copied. Backup time can be significant longer due to limited bandwith and latency. Typically it takes approx. 1 min per 50.000 for scanning (and plus the time needed for transfer).
 
+
# First create a folder c:\util\localusername.
+
# Copy the \\nas1.imm.dtu.dk\util\immbackupwrapper.exe to:<code><br />  %userprofile%\Start Menu\Programs\Startup</code><code> (Windows XP)<br />  </code>C:\Users\[localusername]\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup (Windows 7)
+
# Copy the \\nas1.imm.dtu.dk\util\immbackupwrapper.ini to C:\util\localusername\immbackup.ini and edit it according to needs.
+
# Whenever the user is logging on he will get the option of performing a backup. Additional backup can be performed by running immbackupwrapper.exe manually.
+
  
 
===...add folders to the backup set.===
 
===...add folders to the backup set.===
  
====robocopy sessions====
+
If there is no local immbackup.ini file, the default ini file with a standard set of folders to back up is used.
  
If c:\util\localusername\immbackup.ini does not exists copy \\nas1.imm.dtu.dk\util\immbackup.ini to <br /> c:\util\localusername\immbackup.ini.
+
If you need to change which folders are included (or excluded) in the backup, you have to edit a local ini file. This file will be used instead of the default ini file.
 +
 
 +
If c:\util\username\immbackup.ini does not exists, copy \\nas1.imm.dtu.dk\util\immbackup.ini to <br /> c:\util\username\immbackup.ini (''username'' is your logon name, e.g. 'abcd')
  
 
Edit the sections [robocopyfolders2include], [robocopyfolders2exclude] and [robocopyfiles2exclude] according to need.
 
Edit the sections [robocopyfolders2include], [robocopyfolders2exclude] and [robocopyfiles2exclude] according to need.
Line 54: Line 54:
 
===...restore files which have been backed up.===
 
===...restore files which have been backed up.===
  
====From a robocopy session====
 
  
Look for the files under \\nas1.imm.dtu.dk\Backups\username\pcname\robocopy\driveletter\...
+
Look for the files under \\nas1.compute.dtu.dk\Backups\username\pcname\robocopy\driveletter\...
  
If the files are not there (because the desired file(s) is not from the most the recent robocopy session) please contact [mailto:itsupport@imm.dtu.dk ITSupport ] which will then restore from tape. Describe which files/folders and from which day.
+
 
 +
If the files are not there (because the desired file(s) is not from the most the recent robocopy session) you might find it using snapshots: look for the folder \\nas1.compute.dtu.dk\Backups\username\pcname\robocopy\~snapshot and go to the folder ''nightly.0'' for how it looked last midnight, ''nightly.1'' 2 nights ago, etc. For older versions than one week, please contact [mailto:itsupport@compute.dtu.dk ITSupport ] who will then restore from tape. Describe which files/folders and from which day.
  
 
==More Background Information==
 
==More Background Information==
  
===Robocopy sessions===
+
See the [[Backup_on_Windows_(background_information)|following]] document.
 
+
Keywords; will simply maintain a one to one copy of the folders selected on the network share. Always have the latest copy of the files of interest in the backup share - simplified version control is obtained by placing a copy of the network share on tapes and rotating these tapes on a up to 3 months cycle.
+
 
+
 
+
===Configuration===
+
 
+
There is only one file to do configuration in; c:\util\localusername\immbackup.ini holds both
+
 
+
settings for immbackup and immbackupwrapper. The complete list of supported settings is
+
 
+
<code><nowiki>; Sample c:\util\%username%\immbackup.ini file</nowiki></code>
+
 
+
<code><nowiki>; Copy this file to c:util\%username% and edit it</nowiki></code>
+
 
+
<code><nowiki>; as needed. </nowiki><br /> ; This file show all the supported settings for both immbackup <br /> ; and immbackupwrapper. <br /> ; <br /> ; hc 20100825<br /><br /><br /> ; This section is only read by the immbackupwrapper program <br /> ; If the immbackupwrapper program is used both "immbackup" <br /> ; and "backuppath" must be specified while "authusername" <br /> ; is optional. <br /> [wrapper] <br /> immbackup=\\nas1.imm.dtu.dk\util\immbackup.exe <br /> backuppath=\\nas1.imm.dtu.dk\Backups\%username%\%computername% <br /> authusername=%username% <br /><br /> ; This is only read by the immbackup and the values given below <br /> ; is the defaults if not specified. <br /> [setup] <br /> ;backuppath=\\nas1.imm.dtu.dk\Backups\%username%\%computername%</code><br /><code> ;robocopypath=\\nas1.imm.dtu.dk\util\robocopy.exe</code><br /><code> ;runmanualonly=0 <br /> ;userobocopy=1 <br />  ;lookforunwantedprocesses=0 <br /><br /><br /> ; List of folders to be included in the robocopy backup program. <br /> ; Acceptable environment variables are <br /> ; %username% %userprofile% %computername% <br /> ; <br /> ; Generally, it is not important what is in front of the "=" <br /> ; (i.e. "dir1", "dir2", "file1", etc.) <br /><br /> [robocopyfolders2include] <br /> dir1=c:\%username% <br /> dir2=%userprofile%\favorites\ <br /> dir3=%userprofile%\desktop\ <br /> dir4=c:\util\%username% <br /> dir5=d:\work <br /><br /> ; List of files to exclude. Only if they are a sub-folder <br /> ; of a directory to be include will they be considered <br /> [robocopyfolders2exclude] <br /> dir1=c:\%username%\temp <br /><br /> ; List of files to be excluded. Only if they are a file within <br /> ; a folder to be included will they be considered. <br /> [robocopyfiles2exclude] <br /> file1=c:\%username%\program output\huge temp file.log</code>
+
 
+
Note; lookforunwantedprocesses simply check for a hardcoded list of programs which is known to <br /> use file locking. If a program is running a pop up windows occurs and the user must prompt "OK" <br /> to continue. The list of programs includes (for immbackup.exe version 2.0.12); outlook.exe, <br /> thunderbird.exe, thunde~1.exe, mozilla.exe and msimn.exe (aka Outlook Express).
+
 
+
===Removal of old backups:===
+
 
+
Based on the information in c:…\username\pc_name\immbackupdate.txt old backup sets will <br /> be removed automatically. Once a backup is more than 3 month old it will be removed from the <br /> backup share.
+
 
+
===Command line arguments:===
+
 
+
Immbackup.exe accepts the following command line arguments:
+
 
+
<br />  <code> -1 Check if backup has been performed already today. Abort if yes. <br />  -m Check if runmanual is set to "1" in inifile. Abort if yes.</code>
+
 
+
<code> -h Show version and usage info. <br />  -q Don't copy logfile(s) to c:\util\.... <br />  -v Show additional debugging info. <br /> <br /> Immbackupwrapper.exe only takes one argument: <br />  -h Show version and usage info.</code>
+
 
+
===Files:===
+
 
+
<code>\\nas1.imm.dtu.dk\util\immbackup.exe </code><br /><code>The main backup program. Type "immbackup.exe -h" for further usage info. </code>
+
 
+
<code> C:\util\localusername\immbackup.ini </code><br /><code>This file is the configuration file for both immbackupwrapper and immbackup</code>
+
 
+
<code>C:\Documents and Settings\localusername\Start Menu\Programs\Startup\immbackupwrapper.exe<br /> Test whether backup should be performed and takes care of authentication to network fileserver and finally calls immbackup.exe</code>
+
 
+
<code>\\nas1.imm.dtu.dk\Backups\username\pc_name\immbackup.log <br /> Immbackup logs various errors etc. to this file</code>
+
 
+
<code>\\nas1.imm.dtu.dk\Backups\username\pc_name\immbackupdate.txt <br /> Immbackup logs time stamps for robocopy and ntbackup sessions to this file</code>
+
 
+
<code>\\nas1.imm.dtu.dk\Backups\username\pc_name\robocopy <br /> Default location where backup files is located for robocopy sessions</code>
+
 
+
 
+
 
+
<code>\\nas1.imm.dtu.dk\util\immbackupdefault.ini <br /> Default configuration file if C:\util\%username%\immbackup.ini is not found</code>
+
  
<code>C:\util\%username%\immbackup.ini <br /> Local configuration file for immbackup and immbackupwrapper.</code>
 
[[Category:HC]]
 
 
[[Category:Backup]]
 
[[Category:Backup]]

Latest revision as of 17:07, 19 May 2022

This guide is for users at DTU Compute only


This howto describes how to back up data stored locally on Windows PC's (desk- and laptops).

For a description of the general backup concepts please refer to this link.

The information found on this page is specific for windows PC's. Linux, Mac or other *NIX PC users should refer to the 'rzyncbackup' guide found here.

General information about the DTU Compute backup program

This backup program is run the first time each day a Windows user logs on to the Windows domain. Therefore remember to logout when you leave DTU Compute. DTU Compute backup may also be run on demand. For this setup please contact ITSupport . Please note, that your laptop/PC must be connected to the cabled network at DTU Compute (not wireless) and your laptop/PC must be registered by ITS.

The program is especially useful for Notebook users that can not use our file servers for general storage of data, but need local copies when they are outside DTU Compute.

Customization

As default the backup program uses a server side initialization file for defining the files and directories to backup. The program can be customized to special needs, see below under 'How to'. Per default Documents, Desktop plus various "settings directories" are being backed up (Internet Explorer bookmarks, Firefox settings, etc.).

Technique

The backup is using Robocopy for creating a server side copy of your local data. This server side copy is always online and is included in the nightly backup to tape. Robocopy is a Microsoft utility that can synchronize files and directories. The synchronization method is used in order to only copy data that has changed since the last backup.

To check what has been backed up

The files are backup to the share \\nas1.compute.dtu.dk\backups under username -> machine name . The structure is rather self-explaining.

Note: please do not manually write to this share - files here should only be written by the immbackup utility.

How to

...make sure that a backup is performed

Whenever the user log on to the PC/notebook and the PC is attached to the DTU Compute network immbackup will be executed. However, if the user already logged on earlier the same day no backup will be performed, i.e. at most one backup per day. If an extra backup is desired, run immbackup.exe manually without any arguments. Do this by going to \\nas1.compute.dtu.dk\util and finding the immbackup.exe and run it.

...run backup when not at DTU

[One time only] Start a VPN connection. Next press Windows r. Type \\nas1.compute.dtu.dk. Go to the folder util and find the program immbackup-vpn.bat and copy it to the desktop
[Daily] Start the VPN connection. [Preferable] close down most programs with open files. Run the immbackup-vpn.bat on your desktop simply by double click on it.

Hints: Best to run the command with all programs closed because open files can not be copied. Backup time can be significant longer due to limited bandwith and latency. Typically it takes approx. 1 min per 50.000 for scanning (and plus the time needed for transfer).

...add folders to the backup set.

If there is no local immbackup.ini file, the default ini file with a standard set of folders to back up is used.

If you need to change which folders are included (or excluded) in the backup, you have to edit a local ini file. This file will be used instead of the default ini file.

If c:\util\username\immbackup.ini does not exists, copy \\nas1.imm.dtu.dk\util\immbackup.ini to
c:\util\username\immbackup.ini (username is your logon name, e.g. 'abcd')

Edit the sections [robocopyfolders2include], [robocopyfolders2exclude] and [robocopyfiles2exclude] according to need.

...restore files which have been backed up.

Look for the files under \\nas1.compute.dtu.dk\Backups\username\pcname\robocopy\driveletter\...


If the files are not there (because the desired file(s) is not from the most the recent robocopy session) you might find it using snapshots: look for the folder \\nas1.compute.dtu.dk\Backups\username\pcname\robocopy\~snapshot and go to the folder nightly.0 for how it looked last midnight, nightly.1 2 nights ago, etc. For older versions than one week, please contact ITSupport who will then restore from tape. Describe which files/folders and from which day.

More Background Information

See the following document.