Re: [Bacula-users] Restore from command line
but : 'unmark /home/myfolder' 'unmark home/myfolder' don't work 'cd home' 'unmark myfolder' works so 'unmark $(cat file)' doesn't work (I've tested it to be sure and confirm). Rich a écrit : unmark $(cat file) ? if i understood the question :) On 2008.02.13. 12:14, le dahut wrote: Hello, I'm launching 'restore' from command line with : echo -e restore all\n5\ncd var\ncd lib\nunmark ldap\ndone\n2\nyes\n|bconsole -c /etc/bacula/bconsole.conf As you can see, I unmark some files, but I've more files to unmark and this way looks very ugly to me. Is there a way to specify all those arguments in a file and only launch one command in bconsole to run the restore job ? - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] Restore from command line
unmark $(cat file) ? if i understood the question :) On 2008.02.13. 12:14, le dahut wrote: Hello, I'm launching 'restore' from command line with : echo -e restore all\n5\ncd var\ncd lib\nunmark ldap\ndone\n2\nyes\n|bconsole -c /etc/bacula/bconsole.conf As you can see, I unmark some files, but I've more files to unmark and this way looks very ugly to me. Is there a way to specify all those arguments in a file and only launch one command in bconsole to run the restore job ? -- Rich - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] Restore from command line
On 2008.02.13. 12:53, le dahut wrote: but : 'unmark /home/myfolder' 'unmark home/myfolder' don't work that's unfortunate, if this is the latest version of bacula, it would be a welcome improvement 'cd home' 'unmark myfolder' works so 'unmark $(cat file)' doesn't work (I've tested it to be sure and confirm). you could try cd home\nunmark whatever in the included file - but you'll probably have to be careful with quoting/escaping. creating such a file might be quite a hassle, so in that case a wrapper script could take simple list and construct a file for inclusion (using basename/dirname) - but that's a workaround for a workaround, so bconsole taking full paths would be ven more welcome ;) ... -- Rich - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] Restore from command line
cat file.txt | bconsole -c /etc/bacula/bconsole.conf seems to work. So I'll generate it using templates and file lists. But is there a way to write it in a file included in /etc/bacula/bacula-dir.conf and then : echo -e reload\n | bconsole echo -e restore myrestore\n | bconsole which seems cleaner for me ? Rich a écrit : On 2008.02.13. 12:53, le dahut wrote: but : 'unmark /home/myfolder' 'unmark home/myfolder' don't work that's unfortunate, if this is the latest version of bacula, it would be a welcome improvement 'cd home' 'unmark myfolder' works so 'unmark $(cat file)' doesn't work (I've tested it to be sure and confirm). you could try cd home\nunmark whatever in the included file - but you'll probably have to be careful with quoting/escaping. creating such a file might be quite a hassle, so in that case a wrapper script could take simple list and construct a file for inclusion (using basename/dirname) - but that's a workaround for a workaround, so bconsole taking full paths would be ven more welcome ;) ... - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users