Posted By

garduino on 10/03/10


Tagged

pharo squeak banyan


Versions (?)

Banyan Backup


 / Published in: SmallTalk
 

Banyan Backup

  1. myBackup sourceDirectory class.
  2.  
  3. myBackup where:
  4. [ : path : eachFileDirectoryEntry |
  5. eachFileDirectoryEntry name first ~= $_ ]; execute.
  6.  
  7. myBackup prepareToMakeTargetLikeSource.
  8.  
  9. "directory: '/download/' , self rootTestDirName ;"
  10.  
  11. ftpRootTestDir := ServerDirectory new
  12. type: #ftp ;
  13. server: '192.168.1.2' ;
  14. directory: '/download/' ;
  15. keepAlive: true ;
  16. user: 'pw'.
  17.  
  18. ftpRootTestDir inspect.
  19.  
  20. sourceDirectory := (FileDirectory on: 'c:\tmpBackup').
  21. targetDirectory := (FileDirectory on: ftpRootTestDir).
  22.  
  23. ftpRootTestDir class.
  24. sourceDirectory class.
  25.  
  26. ftpRootTestDir := ServerDirectory new
  27. type: #ftp ;
  28. server: '192.168.1.1' ;
  29. directory: '/www/tmp' ;
  30. keepAlive: true ;
  31. user: 'user';
  32. password: 'pw';
  33. yourself.
  34.  
  35. myBackup := MaBanyanBackup
  36. source:
  37. (FileDirectory on: 'c:\tmpBackup')
  38. target:
  39. (ServerDirectory new
  40. type: #ftp ;
  41. server: '192.168.1.1' ;
  42. directory: '/www/tmp' ;
  43. keepAlive: true ;
  44. user: 'user' ;
  45. yourself).
  46.  
  47.  
  48. myBackup := MaBanyanBackup
  49. source:
  50. (FileDirectory on: 'C:\Documents and Settings\user\Mis documentos')
  51. target:
  52. (FileDirectory on: 'C:\Documents and Settings\user\Mis documentos\BACKUP').
  53.  
  54. myBackup viewProposedChanges.
  55. myBackup prepareToMakeTargetLikeSource.
  56. myBackup execute.
  57.  
  58. x := MaBanyanBackup organization.
  59. x explore.
  60.  
  61. x := MaBanyanBackup methodDict.
  62. x explore.
  63.  
  64. (FileDirectory on: 'C:\Archivos de Programa') maOpenSizeTreeForEntriesLargerThan: 10000000. "only show lines in the report larger than 10MB"

Report this snippet  

You need to login to post a comment.