Hi,
Can I delete accounts in parallel, for example starting N jobs with parallel to execute a zmprov da?
Is there any risks in doing that, and will I gain time doing that?
I have many accounts to delete and it's is taking to much time.
Regards.
[ZCS FOSS 8.8.10] Deleteting several accounts in parallel
- pup_seba
- Outstanding Member
- Posts: 687
- Joined: Sat Sep 13, 2014 2:43 am
- Location: Tarragona - Spain
- Contact:
Re: [ZCS FOSS 8.8.10] Deleteting several accounts in parallel
I once had to delete 2.600 accounts, and I did it one by one...with a script, but one by one. Something like:
for acc in `zmprov -l gaa | grep -iv "admin\|spam\|ham\|virus\|quarent\|galsync"` ; do zmprov echo $acc ; zmprov da $acc ; done
Don't copy/paste this...I just wrote it out of nothing and you would need to test it first. Indeed takes time, but nothing that is so slow that would force you to force your ldap server with many changes at the same time.
Sadly, I don't know if there is risk or not by doing this task in paralell. But if I would have to do it in paralell, I would take care of not "overlapping" account deletion and then just cross fingers
Please note that after you remove the accounts, it will take time to actually see the size in disk being release (du -sh /opt/zimbra/store) and you will have to defragment your mariadb databases manually if you need them to shrink (du -sh /opt/zimbra/db/data).
Good luck,
for acc in `zmprov -l gaa | grep -iv "admin\|spam\|ham\|virus\|quarent\|galsync"` ; do zmprov echo $acc ; zmprov da $acc ; done
Don't copy/paste this...I just wrote it out of nothing and you would need to test it first. Indeed takes time, but nothing that is so slow that would force you to force your ldap server with many changes at the same time.
Sadly, I don't know if there is risk or not by doing this task in paralell. But if I would have to do it in paralell, I would take care of not "overlapping" account deletion and then just cross fingers
Please note that after you remove the accounts, it will take time to actually see the size in disk being release (du -sh /opt/zimbra/store) and you will have to defragment your mariadb databases manually if you need them to shrink (du -sh /opt/zimbra/db/data).
Good luck,
Re: [ZCS FOSS 8.8.10] Deleteting several accounts in parallel
Hi,
Thank you for your help.
My installation is new and empty for the moment, I just created the accounts, we're preparing a migration and we had a problem with the second store.
Unfortunately the data disks were corrupted, and now I have to clean the installation by deleting the store so I started by deleting the users belonging to that store : 5000 account.
I used this command keeping the total number of jobs to one since I wasn't sure about parallel deletion.
cat users_store2.txt | parallel --jobs njobs zmprov da {}
where njobs contains 1
thanks again
Regards.
Thank you for your help.
My installation is new and empty for the moment, I just created the accounts, we're preparing a migration and we had a problem with the second store.
Unfortunately the data disks were corrupted, and now I have to clean the installation by deleting the store so I started by deleting the users belonging to that store : 5000 account.
I used this command keeping the total number of jobs to one since I wasn't sure about parallel deletion.
cat users_store2.txt | parallel --jobs njobs zmprov da {}
where njobs contains 1
thanks again
Regards.
- pup_seba
- Outstanding Member
- Posts: 687
- Joined: Sat Sep 13, 2014 2:43 am
- Location: Tarragona - Spain
- Contact:
Re: [ZCS FOSS 8.8.10] Deleteting several accounts in parallel
Hi,
Let me insist give Zextras a try to do the migration. You can perfectly do the migration just by using the trials (30 days). You could buy it later on or just don't buy it. But using Zextras to migrate will help a lot in regards of calendars, contacts, even provisioning of accounts, domain creation, COS, etc.
Let me insist give Zextras a try to do the migration. You can perfectly do the migration just by using the trials (30 days). You could buy it later on or just don't buy it. But using Zextras to migrate will help a lot in regards of calendars, contacts, even provisioning of accounts, domain creation, COS, etc.
-
- Outstanding Member
- Posts: 283
- Joined: Sat Sep 13, 2014 1:55 am
- ZCS/ZD Version: 8.8.15_FOSS Patch38
Re: [ZCS FOSS 8.8.10] Deleteting several accounts in parallel
Hi, a considerably faster way to use zmprov is creating a file with the commands and passing it to a single zmprov command, follow this Zimbra Tech Center article: https://wiki.zimbra.com/wiki/Bulk_Provisioning
It is not parallel execution, but it is faster than calling zmprov in a while loop.
+1 for the suggestion to use Zextras for a Zimbra to Zimbra migration.
It is not parallel execution, but it is faster than calling zmprov in a while loop.
+1 for the suggestion to use Zextras for a Zimbra to Zimbra migration.
Re: [ZCS FOSS 8.8.10] Deleteting several accounts in parallel
Hi, and thank you all for your replies.
Regarding the use of Zextras, we're not migrating from Zimbra to Zimbra, we're migrating from postfix/dovecot, ..etc mail server to Zimbra.
and from what I've read Zextras is intended to be used only if migrating from Zimbra to Zimbra.
thanks again.
Regards.
Regarding the use of Zextras, we're not migrating from Zimbra to Zimbra, we're migrating from postfix/dovecot, ..etc mail server to Zimbra.
and from what I've read Zextras is intended to be used only if migrating from Zimbra to Zimbra.
thanks again.
Regards.