Commit Graph

72 Commits

Author SHA1 Message Date
Johannes Zellner
83056519ec fs.existsSync always returns a boolean and does not throw 2025-11-13 12:26:51 +01:00
Johannes Zellner
21191bdc50 Give sshfs identity files unique filenames across mounts
If the same host was mounted as volume and backup or as a temporary
backup import, sharing the filename of the identify file would mean it
will get removed while still in use
2025-11-06 16:25:06 +01:00
Girish Ramakrishnan
70c539ac4d mounts: remove loopback type
this is left over code from trying to implement size restricted data dir
2025-11-05 18:29:47 +01:00
Girish Ramakrishnan
de84b5113c mounts: always return message when getting status 2025-11-05 16:52:32 +01:00
Girish Ramakrishnan
f92cdf36f5 system: return the mounted and unmounted block devices (as long as xfs or ext4) 2025-09-23 18:51:23 +02:00
Girish Ramakrishnan
43cc91aca2 fix tests 2025-09-13 15:22:01 +02:00
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
9dfe6242b9 mounts: rename name to description
this makes it clear that the field is not important
2025-08-01 15:48:11 +02:00
Girish Ramakrishnan
989d843fcb shell: make shell.sudo promise based and waitable 2025-07-16 22:04:24 +02:00
Girish Ramakrishnan
b391f4bc12 mounts: set encoding 2025-04-09 15:48:53 +02:00
Girish Ramakrishnan
4c87b62b5e typo 2025-01-12 18:25:43 +01:00
Girish Ramakrishnan
665f7c849b mounts: add loopback support 2025-01-12 18:02:06 +01:00
Girish Ramakrishnan
88b9eed559 mount: use enums for mount types 2025-01-12 17:43:55 +01:00
Girish Ramakrishnan
cb162a8f1e xfs: enable pquota by default 2025-01-12 17:33:19 +01:00
Girish Ramakrishnan
df5ba25010 shell: add explicit bash() function 2024-10-16 10:40:17 +02:00
Girish Ramakrishnan
6c3ca9c364 shell: rework code to use shell.spawn
spawn gives out streams and we have more control over the stdout/stderr
buffers. otherwise, we have to provide a max buffer capture size to exec
2024-10-15 12:13:46 +02:00
Girish Ramakrishnan
a9e1d7641d shell: make require take a tag 2024-10-14 21:08:32 +02:00
Girish Ramakrishnan
6742cdf373 backups: remount remote if not mounted before a backup 2024-09-09 18:15:49 +02:00
Girish Ramakrishnan
c03da3be54 volumes: check provider instead of hostPath 2024-08-08 14:41:43 +02:00
Girish Ramakrishnan
36a768eb60 backups: document structure of backupConfig
I keep forgetting this, let's write this up once and for all
2024-06-25 13:06:40 +02:00
Girish Ramakrishnan
d87460a3cd encoding removed by mistake 2024-02-29 11:51:57 +01:00
Girish Ramakrishnan
f076711ad3 add missing await 2024-02-29 10:41:07 +01:00
Girish Ramakrishnan
6149a5ac12 typo 2024-02-29 09:00:22 +01:00
Girish Ramakrishnan
4ea47da269 use execFile 2024-02-28 20:37:11 +01:00
Girish Ramakrishnan
a6f078330f shell: no need to promise scoping 2024-02-21 19:40:27 +01:00
Girish Ramakrishnan
14c9260ab0 shell: exec encoding is utf8 by default and no shell
explicitly mark calls that require the shell
2024-02-21 17:47:25 +01:00
Girish Ramakrishnan
9b94cf18d0 convert more execSync to async 2024-02-21 11:00:12 +01:00
Girish Ramakrishnan
54c7757e38 Fix crash 2024-02-20 21:53:52 +01:00
Girish Ramakrishnan
3da3ccedcb volumes: only wait for 5 seconds for mount status
mountpoint -q can never exit if the nfs mount disappears, for example
2024-02-20 21:38:57 +01:00
Girish Ramakrishnan
64381e2a04 backups: remove validation mount point after testing it
this also moves out the attempt validation logic from mounts code
into volumes. mounts.tryAddMount is also used in backup code
2023-09-29 08:01:58 +05:30
Johannes Zellner
8d0abf214c First attempt a temporary mountpoint 2023-09-28 10:56:46 +02:00
Girish Ramakrishnan
630853abb5 move mountObjectFromBackupConfig into backups 2023-08-15 08:55:38 +05:30
Johannes Zellner
10646e9e04 Add generic disk (partition) backup provider to replace ext4 and xfs 2023-08-08 15:11:22 +02:00
Girish Ramakrishnan
03a77ddf01 Fix validation of hostPath
When adding a volume, this comes in mountOptions. The hostPath in the
database is the computed host path.
2023-02-25 23:41:11 +01:00
Girish Ramakrishnan
1c4205b714 mount: ignore filesystem type 2022-11-03 23:28:02 +01:00
Girish Ramakrishnan
a4a9b52966 Clarify error message 2022-10-02 16:38:12 +02:00
Girish Ramakrishnan
544ca6e1f4 initial xfs support 2022-06-08 10:58:00 -07:00
Girish Ramakrishnan
dbb803ff5e cifs: use credentials file
this supports special characters in passwords better

https://forum.cloudron.io/topic/6577/failed-to-mount-inactive-mount-error-13-when-mounting-cifs-from-synology
2022-03-29 21:26:58 -07:00
Girish Ramakrishnan
0dea2d283b move sshfs key write logic to renderMountFile 2022-03-29 20:15:55 -07:00
Girish Ramakrishnan
cbc44da102 create sshfs dir in start.sh 2022-03-29 20:13:41 -07:00
Girish Ramakrishnan
a786fad3ee mountPoint is only set for 'mountpoint' (unmanaged)
When restoring, mountPoint field is expected for managed mount points
2022-01-26 13:37:16 -08:00
Girish Ramakrishnan
8b9d821905 isMountProvider -> isManagedProvider 2022-01-26 12:40:28 -08:00
Johannes Zellner
0508a04bab Support cifs seal option
https://manpages.debian.org/testing/cifs-utils/mount.cifs.8.en.html#seal
2022-01-10 14:28:09 +01:00
Johannes Zellner
26dbd50cf2 Ensure we don't crash if mount status does not include some strings 2021-10-26 14:54:56 +02:00
Johannes Zellner
d1a7172895 Add remount route for mountlike backup storages 2021-10-11 18:12:11 +02:00
Johannes Zellner
9eed3af8b6 add volume remount 2021-10-11 16:22:56 +02:00
Girish Ramakrishnan
ae4a091261 pass debug for safe call 2021-09-29 20:15:54 -07:00
Girish Ramakrishnan
3bcd32c56d restore: mount all volumes before restoring apps
fixes #786
2021-09-28 11:51:01 -07:00
Girish Ramakrishnan
d79206f978 mounts: volume -> mounts
this code is shared by volume code and backup code
2021-09-28 11:44:09 -07:00
Girish Ramakrishnan
004e812d60 merge backupdb into backups.js 2021-07-14 15:10:45 -07:00