Girish Ramakrishnan
de84b5113c
mounts: always return message when getting status
2025-11-05 16:52:32 +01:00
Girish Ramakrishnan
d6a4dd6965
backup sites: fix listing when status call errors
...
* fix backend to not retry in status call
* fix frontend to continue loading view if status errors
* fix connect-lastmile to show the exact path that is timing out
2025-10-16 14:13:31 +02:00
Girish Ramakrishnan
11f2acd702
init data with initial config and only mutate what we allow editing
2025-10-09 12:20:59 +02:00
Girish Ramakrishnan
43e426ab9f
Revert "Add no-use-before-define linter rule"
...
This reverts commit fdcc5d68a2 .
Unfortunately, this requires us to move exports to the bottom.
This in turn causes circular dep issues and also access of
exports.GLOBAL_VAR in the global context
2025-10-08 21:17:52 +02:00
Girish Ramakrishnan
f2316ec84e
storage: remove usage of secret placeholder
2025-10-08 15:49:56 +02:00
Girish Ramakrishnan
31df40a841
storage: add copyDir
...
we changed listDir in c44863a9bb to list
a directory . this broke copy for files since a '/' is added when listing
the file.
2025-08-26 00:01:14 +02:00
Girish Ramakrishnan
c44863a9bb
s3: ensure we list directory
...
<timestamp>/box_v9.0.0.backupinfo ends up getting listed
when trying to list <timestamp>/box_v9.0.0 !
2025-08-25 19:15:21 +02:00
Girish Ramakrishnan
832a25601d
storage: make listDir return paths relative to the root
...
this seems more natural to work with
2025-08-16 18:13:02 +05:30
Girish Ramakrishnan
12e073e8cf
use node: prefix for requires
...
mostly because code is being autogenerated by all the AI stuff using
this prefix. it's also used in the stack trace.
2025-08-14 12:55:35 +05:30
Girish Ramakrishnan
7ef9e7eb51
storage: add getStatus hook
2025-08-04 11:01:20 +02:00
Girish Ramakrishnan
4fcaae8053
backup: fix listDir to return path instead of fullPath
2025-08-02 10:24:51 +02:00
Girish Ramakrishnan
c935744f4c
backups: root ~~canal~~ path surgery
...
remove rootPath and getBackupFilePath from the backup target and
make this backend specific.
2025-08-02 10:15:34 +02:00
Girish Ramakrishnan
53e9925880
backups: make id, provider a backend specific setting
...
the backend can stash whatever values it wants in the config.
just like the DNS backends, we make verifyConfig return a sanitized config.
added benefit is that extra user fields (via API) are also not dumped into the db.
2025-08-01 18:55:04 +02:00
Girish Ramakrishnan
ea419509f1
backups: add setup/teardown
...
1. add setup, teardown hooks
2. move the managed mount setup and teardown to filesystem backend
3. remove this vague storage.js
we should convert storageApi into a real object, so we don't have to
keep passing apiConfig around
2025-08-01 15:36:25 +02:00
Johannes Zellner
2386124089
Upcloud S3 does not return a Contents property if no keys are found
2025-07-22 18:55:44 +02:00
Girish Ramakrishnan
5548ed1b57
s3: fix malformed endpoint URL from older versions
...
this is specifically for linode, but may apply for other storages too
2025-07-16 09:12:57 +02:00
Girish Ramakrishnan
bb257f2bf2
s3: make delete objects work again again
2025-07-15 01:11:23 +02:00
Girish Ramakrishnan
76f365f7e8
s3: make delete objects work again
2025-07-15 00:13:40 +02:00
Girish Ramakrishnan
499336e752
s3: fix debug
2025-07-14 22:24:23 +02:00
Girish Ramakrishnan
e53ec3e43c
s3: add debugging code
2025-07-14 21:59:56 +02:00
Girish Ramakrishnan
15ac81c1cd
s3: format errors with .Code
2025-07-14 15:54:31 +02:00
Girish Ramakrishnan
241053e1a8
s3: error handling has changed in v3 api
2025-06-20 16:07:21 +02:00
Girish Ramakrishnan
48bf21a537
s3: use listObjectsV2 API
...
in some minio instances, listObjectV1 is not returning all the objects
2025-05-26 14:17:13 +02:00
Girish Ramakrishnan
20a30b303b
s3: fix encoding of downloaded stream
2025-02-13 19:29:07 +01:00
Girish Ramakrishnan
59721a3f1a
s3: in v3, Body is a stream
...
https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/migrate-s3.html
2025-02-13 15:17:48 +01:00
Girish Ramakrishnan
cb6d531300
storage: automatically abort old multipart uploads in s3
2025-02-13 11:09:15 +01:00
Girish Ramakrishnan
a138425298
storage: start migration of s3 api
2025-02-12 23:04:37 +01:00
Girish Ramakrishnan
9888aa8c08
storage: rework listDir api to be a generator (like) function
2025-02-12 19:34:57 +01:00
Girish Ramakrishnan
b4d58f0609
aws: add a 20min timeout
...
in some services like b2, the multi-part copy just hangs. this allows
us to retry
2024-11-20 07:13:43 +05:30
Girish Ramakrishnan
ea72cef7f9
storage: remove getProviderStatus
2024-09-09 17:36:51 +02:00
Girish Ramakrishnan
4a29371907
s3: sometimes message is null and only code is valid
2024-08-13 07:08:33 +02:00
Girish Ramakrishnan
e9b6002f63
s3: fix exists check
2024-07-14 22:04:12 +02:00
Girish Ramakrishnan
1dc6b40a68
tgz: extract using tar-stream directly
...
we used have a fork of tar-fs. using tar-stream directly gives us
more control
2024-07-08 13:06:56 +02:00
Girish Ramakrishnan
e481606d0e
lint
2024-07-02 16:09:36 +02:00
Girish Ramakrishnan
934c701be2
vultr: fix copy of large objects
...
https://forum.cloudron.io/topic/10266/backups-are-failing
2023-10-26 09:51:07 +02:00
Girish Ramakrishnan
aa8c23c8b3
rework backup root
...
notes:
* backup root cannot come from backend. for dynamic mounts backend cannot know where it is mounted
* backupConfig is 3 parts - format / mount / password . there is also this rootPath (which should not be in db)
* password should be stored separately in settings at some point
* format has to be passed along everywhere because we allow restore from same backupConfig but different format. we do this by saving the format in the backups table
fixes #819
2023-08-15 22:51:45 +05:30
Girish Ramakrishnan
e6b85c2df7
remount does not need a backend hook
2023-08-15 08:55:38 +05:30
Girish Ramakrishnan
3d5c21d9ca
backups: encrypted backups must have .enc extension
2023-07-24 22:25:06 +05:30
Girish Ramakrishnan
050a82039a
getBackupProviderStatus -> getProviderStatus
2023-07-15 11:00:45 +05:30
Girish Ramakrishnan
c86059e070
backups: move limits into a sub object
...
fixes #817
2023-07-13 12:17:57 +05:30
Girish Ramakrishnan
4a1cdd4ef1
Update aws-sdk and suppress maintenance mode message
...
https://github.com/aws/aws-sdk-js/issues/4354
2023-05-11 22:18:00 +02:00
Girish Ramakrishnan
c4f4f3e914
logs: use %o to format error
...
otherwise, they are printed as multi-line and this messes up tail+date formatting
2023-04-16 10:49:59 +02:00
Girish Ramakrishnan
093fc98ae5
s3: add listing check
...
This is needed for situations like in cloudflare where the endpoint can
be mistakenly configured with the bucket name like https://xx.r2.cloudflarestorage.com/cloudron-backups .
The upload and del calls work but list and copy does not.
2023-01-17 11:13:03 +01:00
Girish Ramakrishnan
40bcfdba76
s3: throw any copy errors
2023-01-17 11:00:03 +01:00
Girish Ramakrishnan
c3793da5bb
split checkPrecondition so it can be used in cleaner as well
2022-10-02 17:41:21 +02:00
Girish Ramakrishnan
074e9cfd93
rename getRootPath to getBackupRootPath
2022-10-02 16:26:27 +02:00
Girish Ramakrishnan
9d17c6606b
rename to checkBackupPreconditions
...
since this is called only by the backup logic
2022-10-02 16:20:14 +02:00
Girish Ramakrishnan
ea01586b52
storage: make copy async
2022-04-30 16:24:45 -07:00
Girish Ramakrishnan
2280b7eaf5
Add S3MultipartDownloadStream
...
This extends the modern Readable class
2022-04-29 18:23:56 -07:00
Girish Ramakrishnan
801dddc269
inline S3ReadStream
2022-04-15 11:25:15 -05:00