Girish Ramakrishnan
c5b7264f1a
rename backupTargets to backupSites
2025-09-12 10:32:37 +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
08c2e989fa
syncer: fix test
2025-08-14 16:16:58 +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
2fabfbe8f6
rsync: add integrity information
2025-08-13 14:43:05 +05:30
Girish Ramakrishnan
2e16dd983f
backups: stash the stats to the backups table
2025-08-12 20:21:54 +05:30
Girish Ramakrishnan
847f57855c
Fix test
2025-08-12 20:21:54 +05:30
Girish Ramakrishnan
47fc9561ab
backups (tgz): save integrity information
...
we generate a signing key pair for each target. Initially, I had this
as global. We needed a route to return the public key and putting it
under backup target seemed natural. Since we delete the backups when
we delete a target, we lose all the signing hashes. So, it's fine to lose
the key pair on target delete.
2025-08-12 19:00:29 +05:30
Girish Ramakrishnan
fddbe6a574
Fixup tests
2025-08-04 23:11:50 +02:00
Girish Ramakrishnan
28e23dfdab
backuptargets: add test that archives/backups are removed when target is deleted
2025-08-04 10:21:29 +02:00
Girish Ramakrishnan
2c80c4a7d5
backuptargets: fix del to delete archives as well
2025-08-04 10:16:19 +02:00
Girish Ramakrishnan
547d8ae113
filesystem: rename backupFolder to backupDir
2025-08-02 10:37:37 +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
3cabbc1328
backupformat: getFileExtension
2025-08-01 22:58:26 +02:00
Girish Ramakrishnan
ae3a34287a
backup target: create snapshot and cache files per target
...
snapshot file tracks the snapshot directory. when app gets deleted,
the cleaner will remove the upstream snapshot directory when it runs.
cache files are used in rsync logic to track what was uploading into
snapshot in the previous run without needing to rescan upstream.
2025-07-30 11:44:42 +02:00
Girish Ramakrishnan
83ab701d02
eventlog: add backup target eventlog
2025-07-25 12:23:41 +02:00
Girish Ramakrishnan
59aaabecc7
backups: the get route was accidentally removed
2025-07-25 11:56:31 +02:00
Girish Ramakrishnan
3f07bb5c3a
backup targets: add test for all routes
2025-07-25 11:29:00 +02:00
Girish Ramakrishnan
276db17f0c
backups: use a real targetId
2025-07-25 08:12:27 +02:00
Girish Ramakrishnan
62017b3ff5
backup: rename back backuplisting.js to backups.js
...
this was a transitional rename till I figured out how to split
it in backuptargets.js
2025-07-25 01:37:19 +02:00
Girish Ramakrishnan
3aafbd2ccb
backups: add backup multiple targets
2025-07-25 01:30:27 +02:00
Girish Ramakrishnan
100bea981d
constants: rename AUTOUPDATE_PATTERN_NEVER to CRON_PATTERN_NEVER
2025-07-24 21:47:46 +02:00
Girish Ramakrishnan
931311f11f
rename backups to backuptargets
2025-07-24 18:54:10 +02:00
Girish Ramakrishnan
5e456f378b
backups: split listing and targets
2025-07-24 18:21:48 +02:00
Girish Ramakrishnan
bf315258c5
backups: add target foreign key to backups table
...
format is part of the backup target
in the future, if we want per-app format or schedule, we can add this
separately to the apps table itself. the full box backup can ignore
apps with a set backup target and use the latest backup (like an errored app).
the nice thing is restore will work correctly.
2025-07-24 17:32:16 +02:00
Girish Ramakrishnan
9780db6fa0
add backup targets table
2025-07-24 17:32:16 +02:00
Girish Ramakrishnan
d857ca46e0
test: add more system tests
2025-07-20 10:25:33 +02:00
Girish Ramakrishnan
66107cf7a4
system: make filesystem return value an array
...
Filesystem of df output is not unique
2025-07-20 10:06:01 +02:00
Girish Ramakrishnan
4f608bdc5f
Fix tasks test
2025-07-18 20:55:54 +02:00
Girish Ramakrishnan
7047ee9391
shell: add timeout logic and rework error handling
...
what's important:
* if task code ran, it exits with 0. this code is regardless of (error, result)
* when it exited cleanly, we will get the values from the database
* if task timed out, the box code kills it and it has a flag tracking timedOut. we can
ignore exit code in this case.
* if task code was stopped, box code will send SIGTERM which ideally it will handle and end with 70.
* if task code crashed and it caught the exception, it will return 50
* if task code crashed and node nuked us, it will exit with 1
* if task code was killed with some unhandleabe signal, taskworker.sh will return the signal (9=SIGKILL)
2025-07-17 12:44:24 +02:00
Girish Ramakrishnan
8bf8c278f0
system: add tests for fs usage route
2025-07-17 01:42:28 +02:00
Girish Ramakrishnan
5539f74bea
system: add disk usage task
2025-07-17 00:09:50 +02:00
Girish Ramakrishnan
989d843fcb
shell: make shell.sudo promise based and waitable
2025-07-16 22:04:24 +02:00
Girish Ramakrishnan
4b79881472
system: route to get filesystem
2025-07-16 17:20:28 +02:00
Girish Ramakrishnan
622aecfd6d
users: add unset route for avatar
...
also add missing tests for avatar and profile locking
2025-07-15 10:06:26 +02:00
Girish Ramakrishnan
be9adb64bb
fix tests
2025-07-15 09:07:23 +02:00
Girish Ramakrishnan
22e23e1e65
auth: add logs when auth fails or succeeds
2025-07-11 18:14:27 +02:00
Girish Ramakrishnan
6ac0cd421a
use the @cloudron/superagent module
2025-07-10 10:56:05 +02:00
Girish Ramakrishnan
19c9d7d59d
updateInfo: move updateInfo into apps table
...
this has many advantages:
* easy to deliver the updateInfo via the apps object
* after updating, the task can clear it
* when apps are deleted, the info is automatically gone
otherwise, it's a mess of deps between apps/updater/apptask/rest routes
box update info is still in a file
2025-06-26 15:47:15 +02:00
Girish Ramakrishnan
abd640d36b
merge updatechecker into updater
2025-06-26 14:00:30 +02:00
Girish Ramakrishnan
e0af49f638
appstore: automatic is not stableOnly
2025-06-25 18:17:29 +02:00
Girish Ramakrishnan
1672217dd9
replace mysql module with mysql2
...
mysql is deprecated since years now
2025-06-19 12:41:49 +02:00
Girish Ramakrishnan
313c90ff85
database: change charset to utf8mb4
...
part of #836
2025-06-19 10:39:40 +02:00
Girish Ramakrishnan
d9c104613c
tasks: rework the startTask API
...
it is now async. change was required to reset the pending flag
2025-06-17 19:32:46 +02:00
Girish Ramakrishnan
11a852d49c
test: enablePop3 is now required
2025-06-14 09:17:46 +02:00
Johannes Zellner
e6d8115e52
Allow to set enablePop3 when adding a mailbox
2025-06-13 17:38:55 +02:00
Girish Ramakrishnan
d112d6308c
move tokens.ID_ into oidcClients.ID_
2025-06-12 00:25:28 +02:00
Girish Ramakrishnan
1ca8eeeb50
split oidc into server and clients
2025-06-11 22:26:23 +02:00
Girish Ramakrishnan
8fc9685a1b
test: make it work again
2025-06-11 15:14:15 +02:00