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
b32288050e
backups: check mount status before checking available size
2022-10-02 16:16:30 +02:00
Girish Ramakrishnan
544ca6e1f4
initial xfs support
2022-06-08 10:58:00 -07:00
Girish Ramakrishnan
ea01586b52
storage: make copy async
2022-04-30 16:24:45 -07:00
Girish Ramakrishnan
64a2493ca2
Fixup prettyBytes
2022-04-15 17:56:24 -05:00
Girish Ramakrishnan
bdc9a0cbe3
inline prettyBytes
2022-04-15 09:18:07 -05:00
Girish Ramakrishnan
0abc6c8844
replace pretty-bytes module
2022-04-15 07:34:16 -05:00
Girish Ramakrishnan
685bda35b9
storage: make remove and removeDir async
2022-04-14 16:16:20 -05:00
Girish Ramakrishnan
d54c03f0a0
storage: make exists async
2022-04-14 12:24:34 -05:00
Girish Ramakrishnan
11f7be2065
storage: verifyConfig is now async
2022-04-14 12:24:30 -05:00
Girish Ramakrishnan
a39e0ab934
storage: make remount async
2022-04-14 09:57:31 -05:00
Girish Ramakrishnan
b51082f7e4
storage: checkPreconditions is now async
2022-04-14 07:40:19 -05:00
Girish Ramakrishnan
452a4d9a75
backups: add remotePath
...
the main motivation is that id can be used in REST API routes. previously,
the id was a path and this had a "/" in it. This made /api/v1/backups/:backupId
not work.
2022-04-04 20:40:40 -07:00
Girish Ramakrishnan
54934c41a7
storage: rename getBackupPath to getBasePath
2022-04-04 14:08:24 -07:00
Girish Ramakrishnan
2434e81383
backups: fix incorrect mountpoint check with managed mounts
2022-02-25 12:53:05 -08:00
Girish Ramakrishnan
dfebda7170
Remove deprecated fs.rmdirSync
2022-02-16 20:30:33 -08:00
Girish Ramakrishnan
2ed770affd
mountpoint: allow chown flag to be set
2022-02-16 11:48:37 -08:00
Girish Ramakrishnan
964c1a5f5a
remove field from errors
...
we have standardized on indexOf in error.message by now
2022-02-07 13:44:29 -08: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
6d864d3621
ensure we have atleast 1GB before making an update
2021-11-16 18:20:40 -08:00
Johannes Zellner
d1a7172895
Add remount route for mountlike backup storages
2021-10-11 18:12:11 +02:00
Johannes Zellner
635c5f7073
For some reason using df with regular promises breaks and calls catch without error
2021-07-29 22:21:18 +02:00
Girish Ramakrishnan
3659210c7b
typo
2021-07-10 11:13:36 -07:00
Girish Ramakrishnan
5d836b3f7c
sshfs: only chown when auth as root user
2021-07-10 08:36:30 -07:00
Girish Ramakrishnan
17a70fdefd
sshfs: hide private key
2021-07-09 16:07:45 -07:00
Johannes Zellner
41273640da
SSHFS also does not need to chown here
2021-06-30 17:10:34 +02:00
Girish Ramakrishnan
0b0d552f58
Fix usage of execSync
...
important thing is to not use encoding: 'utf8' because in that case
it will return a string instead of a Buffer object. '' is false but
Buffer() is not.
2021-06-24 12:59:47 -07:00
Girish Ramakrishnan
02263e8921
add back mountpoint check
2021-06-22 15:52:50 -07:00
Girish Ramakrishnan
5040b4f3f9
backups: chown and preserve attribs on ext4 and sshfs
2021-06-22 09:27:11 -07:00
Girish Ramakrishnan
ceddabd691
Fix tryAddMount usage
2021-06-21 23:13:37 -07:00
Girish Ramakrishnan
a34bdb9ddf
backups: fix mounting logic of backup settings and cloudron restore
2021-05-27 13:52:05 -07:00
Girish Ramakrishnan
14bb928d41
backups: fix various mount issues
2021-05-17 22:58:40 -07:00
Girish Ramakrishnan
124954d490
migrate old providers as generic mountpoint provider
2021-05-17 13:23:32 -07:00
Girish Ramakrishnan
f3d9b81942
check for autofs mounts
...
autofs mounts are "mounts on demand". this way, instead of mounting
lots of things on startup, you can mount it on first access.
2021-03-19 09:59:09 -07:00
Girish Ramakrishnan
93510654a5
nfs: also check for nfs4 mount type
...
it seems in some version of ubuntu you mount with "-t nfs4".
this still doesn't handle autofs yet.
https://help.ubuntu.com/community/NFSv4Howto
2021-03-19 09:54:09 -07:00
Girish Ramakrishnan
c4dffa393b
backups: remove entries from database that don't exist in storage
...
fixes #772
2021-02-19 11:34:22 -08:00
Girish Ramakrishnan
eff9d378e5
nfs: chown the backups for hardlinks to work
2020-12-18 17:14:42 -08:00
Girish Ramakrishnan
0f9a5c6b9a
nfs: is prefix is empty, it errors
2020-12-18 14:41:59 -08:00
Girish Ramakrishnan
ca17afc734
volumes: better hostPath validation
2020-12-03 23:05:06 -08:00
Girish Ramakrishnan
41053d6857
validate backup folder and prefix
2020-12-01 12:46:02 -08:00
Girish Ramakrishnan
e68db4ce57
Aim for 60% used space
2020-11-02 23:42:53 -08:00
Johannes Zellner
493f1505f0
Check also for mountpoint on filesystem with external disk
2020-07-02 19:08:27 +02:00
Johannes Zellner
a96da20536
TODO is done for filesystem backend moutnpoint check
2020-06-26 17:57:26 +02:00
Johannes Zellner
60f1b2356a
Also make nfs storage provider same as cifs and sshfs
2020-06-22 15:51:05 +02:00
Girish Ramakrishnan
c855d75f35
remove mkdirp use
...
node 10.12 has { recursive: true }
2020-06-11 08:27:48 -07:00
Johannes Zellner
89494ced41
Check for sshfs and cifs backup backends, if they are mounted
2020-06-08 17:46:52 +02:00
Johannes Zellner
ef764c2393
Merge sshfs.js into filesystem.js
2020-06-08 17:08:26 +02:00
Johannes Zellner
8624e2260d
add storage api to make preflight checks
...
Currently there is only disk space checking but sshfs and cifs need
mount point checking as well
2020-06-08 16:25:05 +02:00
Johannes Zellner
3557fcd129
Add sshfs quirks to shared code in filesytstem.js
2020-06-05 13:45:25 +02:00