Home > Windows > Windows backup vbscript

Windows backup vbscript

Windows VBS script to backup Desktop and Laptop


PROS AND CONS
  • -No delta backup / no incremental (but robocopy only copy files changed)
  • -No encryption (but only the user has access to its folder, check setACL function)
  • -No compression (Could easly be done with 7zip
  • -User can restore (only directly via SHARE)
  • +Free
  • +Easy and simple to Run
  • +Fast
  • +Can backup opened pst files using shadowspwan
  • +Robocopy will only copied files that have been changed
  • -Robocopy will also copy PST everytime (since outlook changes it) (Implemented a check to only copy once a day)
    DOUBTS
  • PST ONCE a Month OK ?
  • Maybe ZIP -9 it before sending it and have server process to unzip and fix permissions
IMPLEMENTED

‘OK – Set List to be backuped in array and text file
‘OK – PST using shadowspawn and robocopy
‘OK – Logfile (list files backuped, time index, time total, size index )
‘OK – Clean Robocopy logfile
‘OK – Could have txt file with last list (if same day reuse it)
‘OK – 1-Create list of files backuped
‘OK – 2-Logs and list on the target share
‘OK – 3-Before doing copy check if already on the today list if it is do not copy it (MUST for PST)
‘OK – Permission on Destination folder should be set for User and Admin ONLY: CACLS files /e /p {USERNAME}:{PERMISSION}
‘OK – Limiti bandwidth for .PST files, over 1GB – can be done with robocopy (10m)
‘OK – Control max number of backups to run at the same time

 

POSSIBLE BUG

‘If user cancel backup with CONTROL-C lock file will remain and no other backups will run ( maybe ignore if lock if file is from same username)

TODO

‘Send an email as HTML (2hr)
‘Limiti bandwidth only on large files, over 1GB – can be done with robocopy (10m)
‘Simple HTML page for status and recent backups (90m)

BEST WAY TO RUN IT

‘(not possible) 1- RemoteExec via psexec and .bat file ‘-1. BAT should copy all req files and call vbs script (must run with the logged user profile)
‘2- Via GPO, on logon
‘3(not possible)- Configure Remote Task Schedulle on each PC
‘4- Manually, ask user to click on desktop .bat file
‘5-Via GPO, bat to configure schedulle task ?

MAINTANCE(HOWTO)

Would run remotely from a Task Scheduller to each PC

Here is the code:

  1. No comments yet.

VAMOVE *

*