I wanted to share this tip with you, because I think it’s a pretty easy-to-setup and secure way to backup your files in the cloud. Would be cool if (something like) this became an Obsidian feature or plugin:
I currently have my Vault on my local filesystem, and created a small bash script that does the following thing each day:
- Compress vault to 7z, use 7zip’s encryption with a password
- Copy file to cloud storage, (filename year-month-day.7z)
Since I don’t use many images in my notes, the storage size required by these daily backups remains small. However, if my vault size grows too big for storing months of daily backups copies, I can imagine that I implement the following rule:
- Store a daily note for each day of the past week.
- For weeks preceding the past week: Delete all backups from that week, except for the final backup of that week.
- For the months preceding the past month, only store the final backup of that month.
If anyone reading this wants to implement this by themselves, creating a backup from the command line is pretty straightforward. Note that this does store your password visibly on your local filesystem, be aware of this:
7z a -pPASSWORD $(date "+%Y%m%d".7z) PATH-TO-FOLDER
Just replace PASSWORD and PATH-TO-FOLDER with yours. You’ll have to create the rest of this script (copying the 7z) and scheduling the execution with automator by yourself, but that’s also pretty straightforward.