-
Notifications
You must be signed in to change notification settings - Fork 148
Implement backupToStorage appwrite function #304
Implement backupToStorage appwrite function #304
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left some comments.
$db = new Database($client); | ||
$data = []; | ||
$tempFile = tmpfile(); | ||
$collections = $db->listCollections(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lets add pagination, this will only return 25 collections.
$collections = $db->listCollections(); | ||
foreach ($collections['collections'] as $collection) | ||
{ | ||
$appwriteDocuments = $db->listDocuments($collection['$id']); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lets add pagination, this will only return 25 documents.
unset($document['$id']); | ||
unset($document['$collection']); | ||
unset($document['$permissions']); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we make this optional using environment variable?
## 🎯 Trigger | ||
|
||
```bash | ||
php index.php collectionId ... | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the trigger, let's explain how it can be executed: Using "execute now" button in Appwrite console or using createExecution
in client/server-side SDKs.
@geryjuhasz closing this PR for now since there has been no activity in quite a long time. Feel free to reopen it when you're ready to start working on it once again. 🙂 |
No description provided.