DEV Community

Discussion on: How to use Node.js to backup your personal files (and learn some webdev skills along the way)

Collapse
 
december1981 profile image
Stephen Brown

Very nice. I think an optional archive step would be a good idea to add to this - after the rsync to the output directory, tgz or zip the output folder, name the archive file suitably with a date/time, and copy to an archived directory or upload to a cloud service (perhaps encrypting also in the latter case.)

Collapse
 
alexeagleson profile image
Alex Eagleson

That's a REALLY good idea. If I get a chance in the next couple of days I'll definitely add that as en extra section, thank you!

Collapse
 
manomite profile image
Adeyeye George

Instead of hashing which might consume more memory, why not just create a txt file and place the file path and names inside...

Then when checking just compare the file path and name. This will also prevent you from using lock to lock a file too