Commit Graph

9540 Commits

Author SHA1 Message Date
Girish Ramakrishnan
08f7685ca3 backupSite: enableForUpdates in add 2025-09-23 10:21:43 +02:00
Johannes Zellner
49de124fc0 Fix typo 2025-09-22 20:24:29 +02:00
Girish Ramakrishnan
cc939de641 Fixup tests 2025-09-22 20:17:34 +02:00
Girish Ramakrishnan
5157789774 backups: add per site enabledForUpdates flag
previously, we had a singleton 'main' flag to indicate a site can
be used for updates. with this new approach, we can get rid of the
'primary' concept. each site can be used for updates or not.
2025-09-22 18:03:01 +02:00
Girish Ramakrishnan
305441ea28 backups: remove noop backend
the noop backend is migrated into 0 sites config.

when the updater code sees that there is no site to backup, it will
just fail. user has to manually update with skipBackup flag.
2025-09-22 16:44:12 +02:00
Girish Ramakrishnan
4c3a8e1fd7 backup site: add contents
it is a json that can be one of the three:

* null - include everything
* include - only include these ids
* exclude - everything except these ids
2025-09-22 13:28:16 +02:00
Johannes Zellner
7df7fd635b Allow any format for noop backup site 2025-09-21 18:06:32 +02:00
Girish Ramakrishnan
1cac2f6170 add timestamp to the log 2025-09-16 17:58:30 +02:00
Girish Ramakrishnan
e45af9b611 sqlite: disable docker logging when backing up
The redirection > ${outputFile} applies to the docker run client process, not to the container itself.
The Docker daemon is still collecting the container’s stdout and logging it.

https://forum.cloudron.io/topic/13361/after-ubuntu-22-24-upgrade-syslog-getting-spammed-and-grows-way-to-much-clogging-up-the-diskspace/
2025-09-15 15:46:27 +02:00
Girish Ramakrishnan
43cc91aca2 fix tests 2025-09-13 15:22:01 +02:00
Girish Ramakrishnan
c5b7264f1a rename backupTargets to backupSites 2025-09-12 10:32:37 +02:00
Girish Ramakrishnan
82c8fa2640 Revert "Add generic 412 http response handler to ask for dashboard refresh"
This reverts commit 11a6cf8236.

It's unclear in what situations a 412 handler that refreshes the dashboard will help.

We use BoxError.INVALID_CREDENTIALS to be 412.

* Used as internal error code for failed password, app password and totp check
* When password is wrong in external ldap syncing
* appstore token is invalid

In all cases, a dashboard refresh will do nothing afaict. For good measure, I have
converted appstore token case into LICENSE_ERROR which is a 402.
2025-09-11 12:42:12 +02:00
Girish Ramakrishnan
2f4766af9d Fix update progress display 2025-09-10 21:46:03 +02:00
Girish Ramakrishnan
c2e5f19226 very possible code path 2025-09-10 21:10:56 +02:00
Girish Ramakrishnan
60a3ea0cea docker registry: fix typo in eventlog 2025-09-10 17:45:52 +02:00
Girish Ramakrishnan
ba14d1e846 block devices: filter the root disk 2025-09-10 11:52:05 +02:00
Girish Ramakrishnan
33c75076da quote the value in error message 2025-09-08 18:59:47 +02:00
Girish Ramakrishnan
ac7001b96e reverseproxy: remove OCSP support
OCSP is getting deprecated in favor CRLs. Lets Encrypt has already
removed the OCSP URL in the certs and the OCSP validation server
is being decommissioned .

https://letsencrypt.org/2024/12/05/ending-ocsp/
2025-09-04 09:43:49 +02:00
Girish Ramakrishnan
4381809959 docker: container id cannot be null 2025-08-27 08:33:25 +02:00
Girish Ramakrishnan
f7b40d5f92 backupTargets: increase name length 2025-08-26 07:40:58 +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
cdda8649fc backuptask: log the target id 2025-08-25 23:04:56 +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
1e4df539b7 improve the logs 2025-08-25 19:15:08 +02:00
Girish Ramakrishnan
823599fd78 eventlog: add event when backuptarget name changes 2025-08-25 11:08:36 +02:00
Girish Ramakrishnan
94852460c1 backuptarget: update the schedule in the target object 2025-08-25 11:06:18 +02:00
Girish Ramakrishnan
900a789b69 rootPath is not used anymore 2025-08-23 09:35:24 +02:00
Girish Ramakrishnan
013c181aaa typo 2025-08-23 08:16:19 +02:00
Girish Ramakrishnan
3b38440385 apptask: delete app dir files when restoring
also, better deleteAppDir logs
2025-08-22 19:37:50 +02:00
Johannes Zellner
bbc5217c81 Remove unused variable 2025-08-22 16:46:45 +02:00
Johannes Zellner
a5515ad08b Be more explicit on what a backupTarget needs 2025-08-21 11:27:03 +02:00
Johannes Zellner
12e4441227 BoxError always needs a second argument 2025-08-21 11:20:18 +02:00
Johannes Zellner
fdc4ddf316 disk usage update cron job is no more 2025-08-21 11:17:01 +02:00
Johannes Zellner
eb2ebead28 Get the primary backup target during box update 2025-08-21 11:15:42 +02:00
Johannes Zellner
a8ed7eb914 backuptarget.list() needs arguments 2025-08-21 11:10:27 +02:00
Johannes Zellner
fd509a9099 Fix variable shadowing 2025-08-21 11:07:37 +02:00
Johannes Zellner
7bf4b23ee5 Add test to filter out /boot 2025-08-21 10:55:05 +02:00
Johannes Zellner
937dd2be5e Do not list /boot partition for blockdevices routes 2025-08-21 10:26:46 +02:00
Johannes Zellner
5f9789f99f Enforce app count limit during installation 2025-08-20 20:03:09 +02:00
Johannes Zellner
d6d70163d5 Do not reregister during activation if already registerd by setupToken 2025-08-20 17:50:43 +02:00
Johannes Zellner
f779957145 Pass only hostPath as string to mounts.remount() 2025-08-18 14:19:55 +02:00
Girish Ramakrishnan
20b75b4065 rsync: integrity check 2025-08-16 19:29:59 +05:30
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
19682ec21b tgz: integrity check 2025-08-15 21:23:39 +05:30
Girish Ramakrishnan
b71e2957d3 backuptask: add progress message for backupinfo 2025-08-15 16:01:59 +05:30
Girish Ramakrishnan
e7fb444bb3 backuptask: save backupinfo in one place 2025-08-15 14:33:31 +05:30
Girish Ramakrishnan
08c2e989fa syncer: fix test 2025-08-14 16:16:58 +05:30
Girish Ramakrishnan
942e595444 Fix profile test 2025-08-14 16:02:54 +05:30
Girish Ramakrishnan
f2225ff6b6 fs.rmdirSync { recursive: true } is deprecated 2025-08-14 13:43:41 +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