Set up

Back up kintone records to Google Drive

Created: Updated: Estimated time: 10 min

A Pro option (¥3,000 a month per 10 GB). On the Google Drive tab, turn on kintone backup for each app. Every day at 04:30 PRING copies what changed, and on Sundays and the first time everything, into Google Drive under PRING 帳票 / バックアップ / date / app name, keeping 30 days. PRING does not restore: import records-*.csv with kintone's CSV import and reattach attachments from files/ by hand.

Steps

The kintone backup is an option of the Pro plan (¥3,000 a month per 10 GB, in blocks of 10 GB). To order it, use the contact form. You need to be connected to Google Drive and to have registered a view-only API token for each app.

  1. 1. Connect to Google Drive

    If you have not connected yet, follow [Save documents to Google Drive](/en/help/admin/google-drive) and press Connect on the Google Drive tab. Until you connect, you see "Connect to Google Drive under Connection above first."

  2. 2. Register the API token of the app in the API tab

    For each app you want to back up, create a view-only API token in the kintone app settings and register it in the API tab of the PRING settings screen. An app without a token shows "Not registered" in the "kintone API token" column and a "Register in the API tab" button.

  3. 3. Turn on the app under kintone backup

    On the Google Drive tab, under kintone backup, tick "Back up" for the app in the table and press "Save backup settings". Only apps whose token is Registered can be chosen. The usage (for example 3.2 / 10 GB, the 30 days kept) is shown at the top.

  4. 4. Check the first backup

    The first run copies everything. After that, 04:30 each day copies what changed since the last backup, and Sunday copies everything. The "Last result" column shows "date full / changes, n records, n files". To copy everything right away, press "Back up everything now" and, when "Press again to start" appears, press again. It is limited to once a day.

  5. 5. Check the folder in Google Drive

    In Google Drive, open PRING 帳票 / バックアップ / date / app name (app ID) and check that records-0001.csv, records-0001.jsonl, files/ and manifest.json are there. If complete in manifest.json is true, that day was copied to the end.

How the backup works

Item What it is
Apps The apps you turned on under kintone backup
Daily 04:30, what changed since the last backup
Full copy Sundays and the first time
Location My Drive / PRING 帳票 / バックアップ / date / app name (app ID)
Retention 30 days; older dates go to the trash
Restore records-*.csv with the CSV import of kintone; attachments from files/ by hand

Frequently asked questions

What is put there?

records-0001.csv holds the records in a form you can open in Excel (one file per 500 records; $id comes first, a subtable is one JSON column, attachments are names). records-0001.jsonl holds the REST records of kintone as they are, one per line. files/ holds the attachments, named record number__field code__file name (files over 100 MB are not copied and are recorded as failures). manifest.json records the kind (full or changes), the period, complete, the counts, the number and size of attachments, the number of failures and the SHA-256 of each file.

When does it run?

Every day at 04:30 (Japan time) it copies the records and attachments updated since the last successful backup. On Sundays and the first time, it copies everything. Deleted records are not visible in the daily changes, so the Sunday full copy shows which records existed that day. An app already finished that day is skipped.

How long are backups kept?

30 days. Dated folders older than 30 days are moved to the Google Drive trash (Google then removes them after a while). PRING only touches the files and folders it made.

Can PRING restore the data?

No. You restore with the standard functions of kintone. 1) Import a records-*.csv with "Import from file" on the record list of the kintone app. 2) Reattach the attachments from files/ by hand. A subtable is one JSON column in the CSV; the jsonl keeps the REST form of kintone.

What if the space is full?

When the 30 days kept approach your contracted GB, PRING does not start a new backup, and the screen says "The space is full. Add a 10 GB block". It never goes over and charges silently. You can add blocks through the contact form.

How much does it cost?

It is a Pro option at ¥3,000 a month per 10 GB (excluding tax), added in blocks of 10 GB. The Google Drive space is yours; PRING does not store the backup. On Lite and Standard the screen says "The kintone backup is an option of the Pro plan".

I see "No API token is registered" or "kintone refused".

Register an API token with view permission for each app in the API tab. If the permission is not enough you see "kintone refused. Check the token's permission". If the Google Drive connection is lost you see "The Google Drive connection was lost. Connect again"; connect again on the Google Drive tab.

What if a run stops halfway?

Temporary failures of kintone or Google are retried up to 3 times with pauses. For a day that still stops, complete in manifest.json is false, and the next run continues.

Next steps

Written and maintained by: TechJapan LLC (PRING team) (Developer and operator) · Contact