ROCLASI wrote:Hi Rogel,
Here are a few other things to keep in mind.
If you use headless client then the backup is done on the server which is of course the most efficient (closest to the data). Smart client runs on the local machine.
So yes you can use the headless client but then you need to download the backup file to the local machine (and make sure this backup file is uniquely named because other users might be doing a backup at the same time).
So depending on the amount of data you are backing up you might want to choose one or the other.
And you are talking about Windows scheduler. Is this on the server or on the client machine ?
How do you want Windows scheduler to interact with Servoy ? Or do you want to use a batchscript that interacts with psql/pg_dump ?
Hi Robert,
Thanks for the pointers. We are considering the backup to happen on the server. Do you have some advice on how to do the download of the backup file? I did use createFolder and streamFilesFromServer but did not work.
- Code: Select all
var directory_for_backup = "dbbackup"+abc
var d = plugins.file.convertToJSFile(directory_for_backup);
application.output("1..."+ new Date(), LOGGINGLEVEL.WARNING)
if (!plugins.file.createFolder(d))
application.output("Folder could not be created.");
var f = plugins.file.createFile(d+"\\xyz.sql");
application.output("3..."+ new Date(), LOGGINGLEVEL.WARNING)
// Create the file on disk.
if (!f.createNewFile())
application.output("The file could not be created.");
application.output("4..."+ new Date(), LOGGINGLEVEL.WARNING)
var zipfile2 = plugins.it2be_tools.zip(f.getAbsolutePath(), true)
var list = plugins.file.getRemoteFolderContents(directory_for_backup, null, 1);
if (list) {
var monitor = plugins.file.streamFilesFromServer("C:\\test", list);
}
And you are talking about Windows scheduler. Is this on the server or on the client machine ?
The windows scheduler will be on the client machine.
How do you want Windows scheduler to interact with Servoy ?
I have not yet figured out how the interaction from windows scheduler to open the headless client (without opening internet explorer) and call the method from the server. This will be the first time I am doing such.
Or do you want to use a batchscript that interacts with psql/pg_dump ?
We would not be using psql/pg_dump to backup/restore the data for the method should be dynamic to any database.
thanks!