Closed
Description
Hello all,
I hope you can help here... We use the package among other things for backups in the iobroker project and have with current node 20 versions and from node 18.18.0 problems with many users who write their backup directly with a CIFS mount on the Fritzbox NAS.
Currently, I am only aware of problems in connection with Fitzbox and CIFS.
It seems that all attempts since Node 18.18.0 have problems with "fs.createWriteStream" or with .pipe.
Locally on the system there are no problems. The error only occurs when the backup is to be written to the CIFS mount point.
Here is an excerpt of how the create of the backup is constructed.
return new Promise((resolve, reject) => {
const f = fs.createWriteStream(name);
f.on('finish', () => {
this.removeTempBackupDir();
resolve(path.normalize(name));
});
f.on('error', e => {
console.error(`host.${this.hostname} Cannot pack directory ${this.tmpDir}/backup: ${e.message}`);
reject(new IoBrokerError({ message: e.message, code: EXIT_CODES.CANNOT_GZIP_DIRECTORY }));
});
try {
tar.create({ gzip: true, cwd: `${this.tmpDir}/` }, ['backup']).pipe(f);
} catch (e) {
console.error(`host.${this.hostname} Cannot pack directory ${this.tmpDir}/backup: ${e.message}`);
reject(new IoBrokerError({ message: e.message, code: EXIT_CODES.CANNOT_GZIP_DIRECTORY }));
}
});
Are there any known problems with Node 20 and are there any solutions or maybe an update from you?
Metadata
Metadata
Assignees
Labels
No labels