Backup script - Some good suggestions?

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
Albireo
Posts: 1756
Joined: 16 Oct 2013, 13:53

Backup script - Some good suggestions?

Post by Albireo » 25 Jan 2023, 17:37

Hi!
There are many easy ways to back up any directories.
as example FileCopyDir ( Can use ErrorLevel in case of any problems ) or XCopy

But if a slightly more advanced backup is desired, the options are fewer.
  • One desire can be a log file
  • Another wish could be to create several backups that rotate (3 pcs or ...)
  • The program must be activated by the Windows scheduler.
Is there already a good AHK backup program already?

- . _ . - - . _ . - - . _ . - - . _ . - - . _ . - - . _ . - - . _ . - - . _ . -
Have searched and one exciting suggestion is:

Anyone tried By @garry -2017 viewtopic.php?t=41712#p190614?
limitations? ( As far as I understand - no rotated backup )
What information will be saved in the log file?
( Only the date and time when a backup was made? or which files could not be backed up or…? )
I haven't tested the backup yet.

Haven't tried this script either.
Adds incremental number to filename to make a filepath unique
By @SCAN - viewtopic.php?style=17&t=76062&p=419446#p329520

gmoises
Posts: 74
Joined: 18 Nov 2017, 16:43

Re: Backup script - Some good suggestions?

Post by gmoises » 25 Jan 2023, 19:08

Generic Timed Backup Script - Scripts and Functions
- AutoHotkey Community
https://www.autohotkey.com/board/topic/2952-generic-timed-backup-script/

XMCQCX
Posts: 231
Joined: 14 Oct 2020, 23:44

Re: Backup script - Some good suggestions?

Post by XMCQCX » 25 Jan 2023, 22:42

I attempted to create one, but ended up using FreeFileSync. In my opinion, it wasn't worth the effort as there are already good, up-to-date programs that can do it.
https://freefilesync.org/

Albireo
Posts: 1756
Joined: 16 Oct 2013, 13:53

Re: Backup script - Some good suggestions?

Post by Albireo » 26 Jan 2023, 10:44

Thanks!
gmoises wrote:
25 Jan 2023, 19:08
Generic Timed Backup Script - Scripts and Functions
- AutoHotkey Community
https://www.autohotkey.com/board/topic/2952-generic-timed-backup-script/
A really good backup program with many possibilities.
But there are some features that could be improved.

1) The program must be able to be started manually or from e.g. windows scheduler.
(How to change it?)

2) The log file is basically fine,
2a) But it's too hard to find if something failed to copy. Assume that it is ?00 files that have been backed up. Finding the file(s) that could not be backed up is not the easiest thing.

2b) The structure of the log file could have been more adapted to reading in e.g. LibreOffice or Excel.

3) Haven't checked if the program can handle network devices (but it should do it)

XMCQCX wrote:
25 Jan 2023, 22:42
I attempted to create one, but ended up using FreeFileSync. In my opinion, it wasn't worth the effort as there are already good, up-to-date programs that can do it.
https://freefilesync.org/
Really nice suggestion, the downside is if a trojan accidentally gets into the system - the "backup" will also be infected.
Have to dig deeper and test some more, but how does the program know what is "master" and "slave"?
(ie. Could two computers be updated with the same info?)

Right now it feels like an optimal solution to use both systems - Partly a mirroring and also a backup program.

But...
What happens when the files are located locally and the mirroring is on the local network.
Suppose a file has just been changed and the network disconnects from the PC - just as the file is being copied"?
Is there a risk of trouble - corrupted files or...?

RussF
Posts: 1269
Joined: 05 Aug 2021, 06:36

Re: Backup script - Some good suggestions?

Post by RussF » 26 Jan 2023, 11:23

Albireo wrote: Really nice suggestion, the downside is if a trojan accidentally gets into the system - the "backup" will also be infected.
How would having a backup program written in AHK solve that?
Albireo wrote: What happens when the files are located locally and the mirroring is on the local network.
Suppose a file has just been changed and the network disconnects from the PC - just as the file is being copied"?
Is there a risk of trouble - corrupted files or...?
You run that risk with any backup solution. That's why you have multiple backups!

We have about 60 PCs that are backed up nightly via a central server running Backup4All. The nightly backups are stored on the server's local 14TB drive. Then weekly, those backups are backed up to a set of rotating external 14TB drives which are kept off site after the backup completes.

If your data is critical, don't skimp or try to roll your own. There are a number of good commercially available programs available for very little money.
Just my $0.02 worth.

Russ

Albireo
Posts: 1756
Joined: 16 Oct 2013, 13:53

Re: Backup script - Some good suggestions?

Post by Albireo » 26 Jan 2023, 12:23

Thanks for your time!
RussF wrote:
26 Jan 2023, 11:23
...
How would having a backup program written in AHK solve that?
...
You run that risk with any backup solution. That's why you have multiple backups!
Creating multiple backups in multiple locations increases the security of the data.
In the past (a long time ago) bands were changed every day
- It was a secure system - a tape that was not inside the system could not be exposed to Trojans or the like.
Was thinking of doing something similar but with hard drives.
(but change "electrically" - the backup hard drive does not need to be connected all the time)
In all my cases, it is a "full backup" that applies.

This can probably be done with AHK. (but also with Filesync)

I'm most interested in what is not backed up (instead of which backup was successful)
__________________________________________

Absolutely, any sync can "go wrong" but does the user get a message that it failed?

RussF
Posts: 1269
Joined: 05 Aug 2021, 06:36

Re: Backup script - Some good suggestions?

Post by RussF » 26 Jan 2023, 12:43

Albireo wrote: - It was a secure system - a tape that was not inside the system could not be exposed to Trojans or the like.
Was thinking of doing something similar but with hard drives.
(but change "electrically" - the backup hard drive does not need to be connected all the time)
That's exactly why we use external USB drives to do our weekly backup. They are only connected over the weekend to back up our backup server and then are disconnected and stored off-site to remove the possibility of fire loss. We have several drives that are rotated this way. Some facilities rotate off-site backups on a daily basis.
Albireo wrote: Absolutely, any sync can "go wrong" but does the user get a message that it failed?
I check the Backup4All server every morning and can tell immediately if any backup sets failed entirely or any files that could not be backed up for any reason. This happens frequently when a user leaves Outlook open when they leave work and the PST data file cannot be backed up because it is open. You would no doubt get similar notifications from virtually any commercial backup solution.

The question I always ask people who balk at $49, $89 or $129 backup solutions is, "What is your data worth to you and how much would it cost you (in time and money) if it was all lost?" Only you can answer that question, but in my opinion, it's cheap insurance.

Russ

Post Reply

Return to “Ask for Help (v1)”