0
0
Supabasecloud~10 mins

Backup and disaster recovery in Supabase - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to create a backup of your Supabase database.

Supabase
const backup = await supabase.rpc('[1]');
Drag options to blanks, or click blank then click option'
Asave_backup
Bbackup_database
Cmake_backup
Dcreate_backup
Attempts:
3 left
💡 Hint
Common Mistakes
Using a function name that does not exist in Supabase.
Trying to call a method that is not related to backups.
2fill in blank
medium

Complete the code to restore a backup from a file.

Supabase
const result = await supabase.storage.from('backups').[1]('backup-file.sql');
Drag options to blanks, or click blank then click option'
Adownload
Bupload
Crestore
Ddelete
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'upload' instead of 'download' to get the backup file.
Trying to use a method that does not exist in Supabase storage.
3fill in blank
hard

Fix the error in the code to schedule automatic backups.

Supabase
await supabase.functions.[1]('schedule_backup', { cron: '0 0 * * *' });
Drag options to blanks, or click blank then click option'
Acall
Binvoke
Crun
Dexecute
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'call' or 'run' which are not valid Supabase function methods.
Trying to use 'execute' which is not supported.
4fill in blank
hard

Fill both blanks to check the status of a backup and log the result.

Supabase
const status = await supabase.backups.[1]('backup-id');
console.[2](status);
Drag options to blanks, or click blank then click option'
AgetStatus
Blog
Cprint
Dfetch
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'fetch' instead of 'getStatus' for backup status.
Using 'print' which is not a console method in JavaScript.
5fill in blank
hard

Fill all three blanks to create a backup, check its status, and notify the user.

Supabase
const backupId = await supabase.backups.[1]();
const status = await supabase.backups.[2](backupId);
alert('Backup status: ' + status.[3]);
Drag options to blanks, or click blank then click option'
AcreateBackup
BgetStatus
Cstate
DbackupNow
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'backupNow' which is not a valid method.
Trying to alert the whole status object instead of its 'state' property.