[aida] [Squeak] AIDASite>>backupToFIle

Janko Mivšek janko.mivsek at eranova.si
Tue Jan 15 22:34:50 CET 2008


Nicolas, looks like original VW methods. Would you explain your 
backup/restore a bit more? Is this kind of object fileout/filein, like 
BOSS (Binary Object Storage) in VW? What is backed, only this site or more?

This code works already?

JAnko

Nicolas Petton wrote:
> Hi,
> 
> The backup/restore feature is really nice, but the code doesn't seems to
> be ported. So I replaced it with :
> 
> AIDASite>>backupToFile
> 	| filename fileDir |
> 	filename := 'aidasite-', self name, '.obj'.
> 	fileDir := FileDirectory forFileName: filename.
> 	(fileDir fileExists: filename) ifTrue: 
> 		[fileDir copyFileWithoutOverwriteConfirmationNamed: filename
> toFileNamed: ('aidasite-', self name, '-old.obj')].
> 	(FileStream fileNamed: filename)
> 		fileOutClass: nil andObject: self
> 
> 
> AIDASite>>restoreSiteNamed: aString
> 	| filename site |
> 	filename := 'aidasite-', aString, '.obj'.
> 	site := (FileStream fileNamed: filename) fileInObjectAndCode.
> 	^site
> 
> I also think it would be nice to have backup files with dates. What do
> you think ?
> 
> Cheers,
> 
> Nicolas 
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Aida mailing list
> Aida na aidaweb.si
> http://lists.aidaweb.si/mailman/listinfo/aida

-- 
Janko Mivšek
AIDA/Web
Smalltalk Web Application Server
http://www.aidaweb.si


More information about the Aida mailing list