warsiop.blogg.se

Drive snapshot backup script
Drive snapshot backup script










drive snapshot backup script

You can find it by searching for Task Scheduler in the start menu, or by looking in the Windows Administrative Tools folder. Using the Task Scheduler, we can set up automatic backups for WSL2. I had no idea such a thing existed, although, in hindsight, it seems pretty logical that it would. It’s the equivalent to cron/crontab on Linux, and allows you to schedule tasks under Windows. Automating WSL2 BackupsĪfter some creative searching, I discovered the Windows Task Scheduler. Note, I haven’t tested this myself, so I don’t know the details (i.e. As an aside, I have also seen reports that cron doesn’t always run in WSL. That means cron isn’t the most reliable solution. As a result, you’ll only have backups if your WSL2 is up when your backup schedule is configured to run. Some users have suggested using cron within WSL2 to trigger periodic backups, however the cron still relies on WSL2 to be running. This method works incredibly well for getting the files into Windows where my backup program can see them and back them up properly. You’ll find my full ~/backup.sh script (with other features) at the end of this post. Additionally, I added some database backup logic, since I want my development databases backed up too. The above command is wrapped this inside ~/backup.sh, which makes it easy to call on demand – without needing to get the parameters and paths right each time.

drive snapshot backup script












Drive snapshot backup script