You are here

Automated Secure Backups

4 posts / 0 new
Last post
phrekus
Offline
Last seen: 12 years 2 months ago
Joined: 2012-02-07 15:55
Automated Secure Backups

I have read the forums front to back and have not been able to fine a way to create an automated secure backup using toucan. I am very new to LUA and not familiar with the syntax. I am looking to run two fully automated scheduled encrypted backups on opposite days. If anyone can provide some sample scripts or hints that would be awesome.

Steve Lamerton
Steve Lamerton's picture
Offline
Last seen: 10 years 7 months ago
Developer
Joined: 2005-12-10 15:22
Hi

I think that the easiest thing to do would be a script like this:

--Get the current day
day = os.date("%A")
if day == "Monday" or day == "Wednesday" or day == "Friday" then
    secure("job1name")
else
    secure("job2name")
end

Then to run it you need to do something like the following:

toucan.exe --script="scriptname" --password="yourpassword"

You can always put that in a batch file to run easily or the windows task scheduler to make it completely automated. Note this is completely untested but should work, if not let me know if you have any issues.

phrekus
Offline
Last seen: 12 years 2 months ago
Joined: 2012-02-07 15:55
Thanks

Thank you!

So far I can run the backup script below fine.

--Get the current day
day = os.date("%A")
if day == "Monday" or day == "Wednesday" or day == "Friday" then
    backup("MWFBackup")
else
	backup("TTBackup")
end

And it launches fine in command line using.

toucan.exe --script="dofile (getscript([[BackupScript]]))"

The snag I am hitting is encrypting the backed up data. I have been trying to use the batch below.

toucan.exe --script="dofile(getscript([[encryptscript]]))" --password="password"

To run this script.

--Get the current day
day = os.date("%A")
if day == "Monday" or day == "Wednesday" or day == "Friday" then
  	secure("MWFEncrypt")
else
    secure("TTEncrypt")
end

Which does nothing...

Thank you again for the help!

Steve Lamerton
Steve Lamerton's picture
Offline
Last seen: 10 years 7 months ago
Developer
Joined: 2005-12-10 15:22
Actually

I misread your original question somewhat, is there a reason you don't use the encryption option that backup has?

Log in or register to post comments