Do you ever spent some time thinking about backing up your projects? Honestly I did not until my harddrive crashed some weeks ago, resulting in a loss of all the sources. A hard way to reinvent now everything...
So I had to think about a cheap solution, supporting a kind of incremental backup. I remembered the early days of DOS and Windows, doing batch-programming using copy and xcopy. Newer Windows-versions assist you with the powerful command ROBOCOPY, nearly perfect for this, because ROBOCOPY is mirroring the content of a folder to a destination-folder.
All you have to do is to write a small batchfile with the commands for copying your projects-folder to an external destination-folder, this can be an USB-stick or a SD-card, and to put your batchfile into the autostart-folder.
Advantages:
- Automatic unattended backup of your projects always after booting your operating system
- Incremental backup possible if you save your existing backup to another folder before backing up your data from harddisk
Disadvantages:
- Backup runs not after quitting B4A, last changes will be saved during next boot
Sure, this is not a perfect solution, but better than the worst case. I recommend to think about backing up your data!
Example:
1.
This saves your projects with an increment of 5. Open a Texteditor copy this:
robocopy e:/backup/05 e:/backup/06 /mir
robocopy e:/backup/04 e:/backup/05 /mir
robocopy e:/backup/03 e:/backup/04 /mir
robocopy e:/backup/02 e:/backup/03 /mir
robocopy e:/backup/01 e:/backup/02 /mir
robocopy c:/b4a/projects e:/backup/01 /mir
exit
2.
Make sure the structure of the destination-folder exists on your destination. It can be checked and created with additional commands within the batchfile automatically, but is need to be done only once, I made it by hand.
3.
Save the file with the extension .bat and put the file into the Autostart-folder.
Thats all.
Cheers Andi
So I had to think about a cheap solution, supporting a kind of incremental backup. I remembered the early days of DOS and Windows, doing batch-programming using copy and xcopy. Newer Windows-versions assist you with the powerful command ROBOCOPY, nearly perfect for this, because ROBOCOPY is mirroring the content of a folder to a destination-folder.
All you have to do is to write a small batchfile with the commands for copying your projects-folder to an external destination-folder, this can be an USB-stick or a SD-card, and to put your batchfile into the autostart-folder.
Advantages:
- Automatic unattended backup of your projects always after booting your operating system
- Incremental backup possible if you save your existing backup to another folder before backing up your data from harddisk
Disadvantages:
- Backup runs not after quitting B4A, last changes will be saved during next boot
Sure, this is not a perfect solution, but better than the worst case. I recommend to think about backing up your data!
Example:
1.
This saves your projects with an increment of 5. Open a Texteditor copy this:
robocopy e:/backup/05 e:/backup/06 /mir
robocopy e:/backup/04 e:/backup/05 /mir
robocopy e:/backup/03 e:/backup/04 /mir
robocopy e:/backup/02 e:/backup/03 /mir
robocopy e:/backup/01 e:/backup/02 /mir
robocopy c:/b4a/projects e:/backup/01 /mir
exit
2.
Make sure the structure of the destination-folder exists on your destination. It can be checked and created with additional commands within the batchfile automatically, but is need to be done only once, I made it by hand.
3.
Save the file with the extension .bat and put the file into the Autostart-folder.
Thats all.
Cheers Andi
Last edited: