# Automatic backup of calendar entries

**URL:** <https://help.nextcloud.com/t/automatic-backup-of-calendar-entries/12651>\
**Category:** ℹ️ Support\
**Tags:** feature\
**Created:** [May 16, 2017, 5:30am UTC](https://help.nextcloud.com/t/automatic-backup-of-calendar-entries/12651 "2017-05-16T05:30:10Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![g000n](https://help.nextcloud.com/letter_avatar/g000n/32/6_22734026db12803ebb3e059622ac3534.png) [@g000n](https://help.nextcloud.com/u/g000n)\
**Post date:** [May 16, 2017, 5:30am UTC](https://help.nextcloud.com/t/automatic-backup-of-calendar-entries/12651/1 "2017-05-16T05:30:10Z")

</div>

I’d like an automated way of backing up all the calendar entries for all the users on a Nextcloud

- able to set backup intervals (minutes, hours, days, weeks)
- able to set rolling window so that older backups are deleted to make room for current ones
- backups should be in the form of .ICS files that can be easily imported to restore or used elsewhere
- able to write backups to external storage for safe keeping
- able to restore only select calendars, user specific
- user can wind back calendar changes (within the rolling window set by admin)

I really love Nextcloud, but I’ve lost entire team calendars more than once and the Natives will want my head on a pike if I loose it ever again. Please build this for me!

---

<div class="post-metadata">

**Author:** ![tflidd](https://help.nextcloud.com/letter_avatar/tflidd/32/6_22734026db12803ebb3e059622ac3534.png) [@tflidd](https://help.nextcloud.com/u/tflidd)\
**Post date:** [May 16, 2017, 7:32am UTC](https://help.nextcloud.com/t/automatic-backup-of-calendar-entries/12651/2 "2017-05-16T07:32:23Z")

</div>

> [@Calcardbackup: bash script to backup Nextcloud calendars and addressbooks as \*.ics/\*.vcf files](https://help.nextcloud.com/t/calcardbackup-bash-script-to-backup-nextcloud-calendars-and-addressbooks-as-ics-vcf-files/11978):
>
> I like to backup my Nextcloud calendars and addressbooks as \*.ics/\*.vcf files, because it is very easy to restore: just import the backed up \*.ics/\*.vcf file to the server or a client and the accidentally deleted data is back online. calcardbackup downloads all available calendars/addressbooks from a Nextcloud instance as .ics/.vcf files. All downloaded files are then compressed to a single file with the current date in the filename. Your Nextcloud instance is broken? No problem: as long as yo…

---

<div class="post-metadata">

**Author:** ![brunt82](https://help.nextcloud.com/user_avatar/help.nextcloud.com/brunt82/32/13949_2.png) [@brunt82](https://help.nextcloud.com/u/brunt82)\
**Post date:** [August 8, 2017, 10:13am UTC](https://help.nextcloud.com/t/automatic-backup-of-calendar-entries/12651/3 "2017-08-08T10:13:46Z")

</div>

I’m sorry, but for companies the linked script is not practicable: Think about 300 users have their own personal calendar and maybe every user is member of 2 group calendars.  
Additional there is a problem with data protection - the “backup”-user is able to read all entries of all calendars. No data protection officer would allow to use such a script for backup reasons.

Therefore I would like to see if somebody of NC implements a occ-command locally.

---

<div class="post-metadata">

**Author:** ![tflidd](https://help.nextcloud.com/letter_avatar/tflidd/32/6_22734026db12803ebb3e059622ac3534.png) [@tflidd](https://help.nextcloud.com/u/tflidd)\
**Post date:** [August 8, 2017, 11:05am UTC](https://help.nextcloud.com/t/automatic-backup-of-calendar-entries/12651/4 "2017-08-08T11:05:22Z")

</div>

You can backup the whole data base, everything is included there. However, all data is readable at all time for an admin user or in the backup.

You could perhaps get a occ-command, but then you also would have all the data for each calendar in a clear-text file how does this solve your concerns?

---

<div class="post-metadata">

**Author:** ![brunt82](https://help.nextcloud.com/user_avatar/help.nextcloud.com/brunt82/32/13949_2.png) [@brunt82](https://help.nextcloud.com/u/brunt82)\
**Post date:** [August 8, 2017, 11:21am UTC](https://help.nextcloud.com/t/automatic-backup-of-calendar-entries/12651/5 "2017-08-08T11:21:59Z")

</div>

I agree with you that the whole data is in the database and with this backup you will be able to restore every calendar (see the blog from “nickvergessen” for the steps to restore it: [https://www.schilljs.com/2017/03/29/restore-single-calendar-from-backup.html](https://www.schilljs.com/2017/03/29/restore-single-calendar-from-backup.html)).

However, currently I have to restore every one or two weeks a calendar for an user in a similar way for another groupware solution. And it is not very funny, besides it takes more than one hour until the data is restored.

An occ-command may not mean, that the backup-files will be stored as clear-text files. It does only mean, that the backup-process is started on a console locally. That means, there are enough permissions to

- ensure that the currently logged in user is allowed to start the process
- access the database
- store files locally
- etc.

Maybe the occ-command will get all calendar-data and store it a separate backup-database in a simple way to restore it later (yes, I know that this is not, what the original author wrotes) by a mouse click on the administration console.

---

<div class="post-metadata">

**Author:** ![tflidd](https://help.nextcloud.com/letter_avatar/tflidd/32/6_22734026db12803ebb3e059622ac3534.png) [@tflidd](https://help.nextcloud.com/u/tflidd)\
**Post date:** [August 8, 2017, 11:39am UTC](https://help.nextcloud.com/t/automatic-backup-of-calendar-entries/12651/6 "2017-08-08T11:39:33Z")

</div>

> [@brunt82](#):
>
> However, currently I have to restore every one or two weeks a calendar for an user in a similar way for another groupware solution. And it is not very funny, besides it takes more than one hour until the data is restored.

Is there a particular reason why this is required?

For more occ commands, it is better to put a feature request on [Issues · nextcloud/server · GitHub](http://github.com/nextcloud/server/issues)  
However, it should be clear that this is the best solution. If this restoring is required because of an unclear calendar-interface, it would be better to improve the interface.

---

<div class="post-metadata">

**Author:** ![brunt82](https://help.nextcloud.com/user_avatar/help.nextcloud.com/brunt82/32/13949_2.png) [@brunt82](https://help.nextcloud.com/u/brunt82)\
**Post date:** [August 9, 2017, 5:26am UTC](https://help.nextcloud.com/t/automatic-backup-of-calendar-entries/12651/7 "2017-08-09T05:26:56Z")

</div>

The problem sits in front of the display: the user. Either they delete an entry which should not be deleted (in this case [https://github.com/nextcloud/server/issues/1662](https://github.com/nextcloud/server/issues/1662) may help) or they synchronize a private calendar into group calendar by using outlook and the caldav synchronizer.  
However, in both cases would help a simple restore path much.

---

<div class="post-metadata">

**Author:** ![wwe](https://help.nextcloud.com/user_avatar/help.nextcloud.com/wwe/32/72963_2.png) [@wwe](https://help.nextcloud.com/u/wwe)\
**Post date:** [December 2, 2024, 2:06pm UTC](https://help.nextcloud.com/t/automatic-backup-of-calendar-entries/12651/8 "2024-12-02T14:06:59Z")

</div>



---

<div class="post-metadata">

**Author:** ![wwe](https://help.nextcloud.com/user_avatar/help.nextcloud.com/wwe/32/72963_2.png) [@wwe](https://help.nextcloud.com/u/wwe)\
**Post date:** [December 4, 2024, 1:25pm UTC](https://help.nextcloud.com/t/automatic-backup-of-calendar-entries/12651/9 "2024-12-04T13:25:35Z")

</div>


