Open pierre-alain-b opened 2 years ago
@pierre-alain-b this is great news. looking very forward to snappymail. please allow simple automated migration, especially for Nextcloud-snap users where direct access to "data" is complicated.
That's a very good comment!
@the-djmaze, I've tried to just move the rainloop_storage folder as an appdata_snappymail with no success... Do you have a clue on what was changed between the local storage of Rainloop and snappymail? Is there a way we could make the migration easy in your mind?
You or SnappyMail might could do this:
$dir = \rtrim(\trim(\OC::$server->getSystemConfig()->getValue('datadirectory', '')), '\\/').'/appdata_snappymail/';
if (!\is_dir($dir)) {
\mkdir($dir);
$rainloop = \dirname($this->appManager->getAppPath('snappymail')) . '/rainloop/app/data';
$rainloop = $this->appManager->getAppPath('rainloop')) . '/app/data';
if (\is_dir($rainloop)) {
$iterator = new \RecursiveIteratorIterator(
new \RecursiveDirectoryIterator($rainloop, \RecursiveDirectoryIterator::SKIP_DOTS),
\RecursiveIteratorIterator::SELF_FIRST
);
foreach ($iterator as $item) {
if ($item->isDir()) {
\mkdir($dir . DIRECTORY_SEPARATOR . $iterator->getSubPathname());
} else {
\copy($item, $dir . DIRECTORY_SEPARATOR . $iterator->getSubPathname());
}
}
}
}
Basically the idea is "just" to copy the file tree of rainloop into snappymail or is there anything to tweak?
just copy does not work.
copy file tree of rainloop into snappymail
not using plugins -
using plugins -
@scubamuc you're almost right.
I've added concept of the code in above commit.
This doesn't copy directories named plugins
nor cache
and makes a list of the plugins
to install later on.
This looks great! Do you want to call it when doing the initial deployment of snappymail in nextcloud or to have a button in the admin part to trigger it?
@pierre-alain-b would you make the button disappear once it has been triggered, since it is a "one-time" action?
@the-djmaze i'm afraid the last build (2.19.2) has an issue with account credentials.... authentication fails and there is no way to retrieve the password for admin. Any ideas?
Did you try uninstall and install again?
yip, tried several times on different instances... fails on -snap and hosted, using different browsers and private mode, same authentication error.
uninstlled rainloop on hosted NC instance with the goal of fresh install and configuration of snappymail. it seems a "fresh" installation is not possible if rainloop app data is left on the instance. still no admin password visible on various browsers and clean cache. will try removing app data directory completely so that a clean-fresh installation can be tested. possibly an issue in migration on v2.19.2? installation and manual migration in v2.191 was possible. admin passwd was displayed correctly.
I know, the API is deprecated, but could you please re-enable the user settings page? I still need to manage the accounts for my users and the last version made that impossible. I am already transfering the accounts to SnappyMail, however in some regards SnappyMail is stil not stable and leaks user data to other accounts (log out and impersonate does not logout snappymail). In the current state I cannot move to snappy, sadly...
The work here is progressing very nicely: https://github.com/the-djmaze/snappymail/issues/96
@the-djmaze when you think there is a viable and stable snappymail plugin for NC, I propose to release a final rainloop-nextcloud version where the name of the plugin is changed to "Rainloop (deprecated), consider migrating to Snappymail" with a link to the new NC plugin.
What do you think?