Backup .morpho directory before installing a new version of morpho
In morpho 1.7.0 release, there is some non-backward compatibility issues. 1.7.0 release will create eml210 document, but morpho 1.6.1 couldn't search it and read it. So if 1.7.0 doesn't work well, it is hard to switch back to morpho 1.6.1. If we backup the .morpho dir during the installation, it will be easy for user to switch back. The backup file may look like .morpho-1.7.0-beta1.tar.gz.
The issue is if we accumulate too many files, the disk space may run out.
#2 Updated by Shaun Walbridge over 13 years ago
GZipped TAR archives are good because of the size limitation, though the limit isn't present in more recent implementations of Zip (ZIP64). However, neither java.util.zip nor Windows XP's default archive tool can work with ZIP64, leaving the 4GB limit. The two drawbacks to .tar.gz is that Windows folks won't have a default decompressor, and they usually don't understand the idea of archiving vs. compressing, so when they extract the .gz, they expect the directory structure instead of 'just a file'.
As an alternative, could you have a 'restore Morpho 1.6.1' button or something similar that automatically does the restoration? This way you don't have to rely on the user doing the correct steps to restore the backup, but I'm not sure how much work this'd be and if it'd be worth it for this relatively infrequently used feature.
#3 Updated by Matt Jones over 13 years ago
I htink you should use whichever format gives you the most reliable archive -- so it sounds like tar.gz given file size issues. Then the decompression/restore would be an exercise for the reader, and would essentially be a support issue we would handle on a case-by-case basis for now. Downgrading to 1.6.1 should be exceedingly rare -- this is just a safety measure.
#4 Updated by Jing Tao over 13 years ago
So I used tar.gz format for the backup file. In windows, I can user Winzip to the backup file.
Here are some notes:
1. I add a property in config.xml to control if morpho need to backup file.
2. Backup only happens when user first time starts morpho after installing a new version.
3. Backup file would not include previous version .tar.gz files in .morpho dir.
4.I added a progress status bar to indicate the backup processing. In case user may think morpho is hang if the backup takes a long time.
I test in linux, mac and windows, they worked well.