четверг, 30 ноября 2017 г., 11:27:43 UTC+7 пользователь [email protected] написал: > On Friday, November 17, 2017 at 6:18:40 AM UTC-5, Nikitin Artem wrote: > > Hello. > > > > I’m executing a sequence of commands in the Fileset resource (File = “ls –l > > <some-dir> | awk ‘{print $NF}’ etc. . .). I need this, for getting the list > > of files to backup . > > > > The problem is, these commands is executing on Director, not Client. > > > > > > How to execute them remotely (on FIledaemon’s host). Please help. > > To run commands client-side, you can use "Client Run Before Job" or "Client > Run After Job". You can also look at "Run Script", although I've never used > it. You can find them on (or near) pages 70 and 80 of the manual, section 9.2. > > You could then use this to run a script that creates a list of files and > writes to a file which you might call files.txt. You can then put something > like this in your FileSet: > > File = "\\</home/user/files.txt" > > See page 94 of the manual about the less-than sign: "<". > > Hope this helps, > oldtechaa
Hello. Yes, it's good idea. But in my backup system it's not working. "Before job" script and "after job" script run on client normally and I get "Backup OK" after job execution, but backup size is 0 bytes. I start FD with "-d 100" and analyze debug log after backup job show that read FileSet executing before "client run before job". Please help! P.S. Sorry for my English. -- You received this message because you are subscribed to the Google Groups "bareos-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. For more options, visit https://groups.google.com/d/optout.
Apr 06 14:16:33 xen-03 bareos-fd[38045]: xen-03 (50): cram-md5.c:68-0 send: auth cram-md5 <1302898451.1554534993@xen-03> ssl=0 Apr 06 14:16:33 xen-03 bareos-fd[38045]: xen-03 (100): cram-md5.c:123-0 cram-get received: auth cram-md5 <1019832112.1554535114@bareos-dir> ssl=0 Apr 06 14:16:33 xen-03 bareos-fd[38045]: xen-03 (99): cram-md5.c:143-0 sending resp to challenge: z+/29V/np6lkLA/XpU/UQB Apr 06 14:16:33 xen-03 bareos-fd[38045]: xen-03 (100): dir_cmd.c:497-0 <dird: JobId=817 Job=xen-03-srv-node01-srv-node01.2019-04-06_14.18.32_20 SDid=21 SDtime=1554514156 Authorization=IOKI-EOHB-DHNG-PPHJ-BGIC-HOPC-HJDJ-LGGI Apr 06 14:16:33 xen-03 bareos-fd[38045]: xen-03 (100): dir_cmd.c:508-0 Executing JobId= command. Apr 06 14:16:33 xen-03 bareos-fd[38045]: xen-03 (5): dir_cmd.c:1649-817 set sd auth key Apr 06 14:16:33 xen-03 bareos-fd[38045]: xen-03 (100): dir_cmd.c:497-817 <dird: level = full mtime_only=0 Apr 06 14:16:33 xen-03 bareos-fd[38045]: xen-03 (100): dir_cmd.c:508-817 Executing level = command. Apr 06 14:16:33 xen-03 bareos-fd[38045]: xen-03 (10): dir_cmd.c:1471-817 level_cmd: level = full mtime_only=0 Apr 06 14:16:33 xen-03 bareos-fd[38045]: xen-03 (100): dir_cmd.c:497-817 <dird: fileset vss=1 Apr 06 14:16:33 xen-03 bareos-fd[38045]: xen-03 (100): dir_cmd.c:508-817 Executing fileset command. Apr 06 14:16:33 xen-03 bareos-fd[38045]: xen-03 (100): fileset.c:264-817 I Apr 06 14:16:33 xen-03 bareos-fd[38045]: xen-03 (100): fileset.c:264-817 O Z6Ms Apr 06 14:16:33 xen-03 bareos-fd[38045]: xen-03 (100): fileset.c:264-817 N Apr 06 14:16:33 xen-03 bareos-fd[38045]: xen-03 (100): fileset.c:264-817 F </tmp/xen-backup.filelist Apr 06 14:16:33 xen-03 bareos-fd[38045]: xen-03 (100): fileset.c:147-817 Doing < of '/tmp/xen-backup.filelist' include on client. Apr 06 14:16:33 xen-03 bareos-fd[38045]: xen-03 (100): fileset.c:264-817 N Apr 06 14:16:33 xen-03 bareos-fd[38045]: xen-03 (100): dir_cmd.c:497-817 <dird: getSecureEraseCmd Apr 06 14:16:33 xen-03 bareos-fd[38045]: xen-03 (100): dir_cmd.c:508-817 Executing getSecureEraseCmd command. Apr 06 14:16:33 xen-03 bareos-fd[38045]: xen-03 (100): dir_cmd.c:497-817 <dird: storage address=10.245.177.77 port=9103 ssl=0 Apr 06 14:16:33 xen-03 bareos-fd[38045]: xen-03 (100): dir_cmd.c:508-817 Executing storage command. Apr 06 14:16:33 xen-03 bareos-fd[38045]: xen-03 (100): dir_cmd.c:1668-817 StorageCmd: storage address=10.245.177.77 port=9103 ssl=0 Apr 06 14:16:33 xen-03 bareos-fd[38045]: xen-03 (100): bsock.c:70-817 All source addresses Apr 06 14:16:33 xen-03 bareos-fd[38045]: xen-03 (100): bsock_tcp.c:230-817 Current host[ipv4;10.245.177.77;9103] All host[ipv4;10.245.177.77;9103] Apr 06 14:16:33 xen-03 bareos-fd[38045]: xen-03 (100): bsock_tcp.c:153-817 who=Storage daemon host=10.245.177.77 port=9103 Apr 06 14:16:33 xen-03 bareos-fd[38045]: xen-03 (100): cram-md5.c:123-817 cram-get received: auth cram-md5 <1950611687.1554535114@otk-vmbackup> ssl=0 Apr 06 14:16:33 xen-03 bareos-fd[38045]: xen-03 (99): cram-md5.c:143-817 sending resp to challenge: Z7/rR9pnU5Bl1W/T5/NoZA Apr 06 14:16:33 xen-03 bareos-fd[38045]: xen-03 (50): cram-md5.c:75-817 send: auth cram-md5 <648759753.1554534993@xen-03> ssl=0 Apr 06 14:16:33 xen-03 bareos-fd[38045]: xen-03 (50): cram-md5.c:94-817 Authenticate OK 33+x6gtIeA8Y8A+3r+/95B Apr 06 14:16:33 xen-03 bareos-fd[38045]: [179B blob data] Apr 06 14:16:33 xen-03 bareos-fd[38045]: xen-03 (100): dir_cmd.c:508-817 Executing Run command. Apr 06 14:16:33 xen-03 bareos-fd[38045]: [189B blob data] Apr 06 14:16:33 xen-03 bareos-fd[38045]: ' Apr 06 14:16:33 xen-03 bareos-fd[38045]: [154B blob data] Apr 06 14:16:33 xen-03 bareos-fd[38045]: xen-03 (100): dir_cmd.c:508-817 Executing Run command. Apr 06 14:16:33 xen-03 bareos-fd[38045]: [164B blob data] Apr 06 14:16:33 xen-03 bareos-fd[38045]: ' Apr 06 14:16:33 xen-03 bareos-fd[38045]: xen-03 (100): dir_cmd.c:497-817 <dird: RunBeforeNow Apr 06 14:16:33 xen-03 bareos-fd[38045]: xen-03 (100): dir_cmd.c:508-817 Executing RunBeforeNow command. Apr 06 14:16:33 xen-03 bareos-fd[38045]: xen-03 (100): runscript.c:264-817 runscript: running a RUNSCRIPT object type=124 Apr 06 14:16:33 xen-03 bareos-fd[38045]: xen-03 (100): runscript.c:271-817 runscript: running 'sh /usr/local/sbin/lvm-make-snapshot.sh vg00/srv-node01 > /tmp/xen-backup.filelist'... Apr 06 14:16:33 xen-03 bareos-fd[38046]: xen-03 JobId 817: shell command: run ClientBeforeJob "sh /usr/local/sbin/lvm-make-snapshot.sh vg00/srv-node01 > /tmp/xen-backup.filelist" Apr 06 14:16:33 xen-03 bareos-fd[38046]: xen-03 JobId 817: ClientBeforeJob: Using default stripesize 64.00 KiB. Apr 06 14:16:33 xen-03 bareos-fd[38046]: xen-03 JobId 817: ClientBeforeJob: Logical volume "srv-node01-s" created. Apr 06 14:16:33 xen-03 bareos-fd[38045]: xen-03 (100): runscript.c:301-817 runscript OK Apr 06 14:16:33 xen-03 bareos-fd[38045]: xen-03 (100): dir_cmd.c:1088-817 Back from run_scripts ClientBeforeJob now: OK Apr 06 14:16:33 xen-03 bareos-fd[38045]: xen-03 (100): dir_cmd.c:497-817 <dird: backup FileIndex=0 Apr 06 14:16:33 xen-03 bareos-fd[38045]: xen-03 (100): dir_cmd.c:508-817 Executing backup command. Apr 06 14:16:33 xen-03 bareos-fd[38045]: xen-03 (100): dir_cmd.c:1946-817 JobFiles=0 Apr 06 14:16:33 xen-03 bareos-fd[38045]: xen-03 (100): dir_cmd.c:1976-817 begin backup ff=7f48f80017e8 Apr 06 14:16:33 xen-03 bareos-fd[38045]: xen-03 (50): find.c:164-817 Verify=<V> Accurate=<Cmcs> BaseJob=<Jspug5> flags=<-134211120> Apr 06 14:16:33 xen-03 bareos-fd[38045]: xen-03 (100): heartbeat.c:153-817 Send kill to heartbeat id Apr 06 14:16:33 xen-03 bareos-fd[38045]: xen-03 (100): backup.c:185-817 end blast_data ok=1 Apr 06 14:16:33 xen-03 bareos-fd[38045]: xen-03 (100): dir_cmd.c:511-817 Quit command loop. Canceled=0 Apr 06 14:16:33 xen-03 bareos-fd[38045]: xen-03 (100): runscript.c:264-817 runscript: running a RUNSCRIPT object type=124 Apr 06 14:16:33 xen-03 bareos-fd[38045]: xen-03 (100): runscript.c:271-817 runscript: running 'sh /usr/local/sbin/lvm-remove-snapshot.sh vg00/srv-node01'... Apr 06 14:16:33 xen-03 bareos-fd[38046]: xen-03 JobId 817: shell command: run ClientAfterJob "sh /usr/local/sbin/lvm-remove-snapshot.sh vg00/srv-node01" Apr 06 14:16:34 xen-03 bareos-fd[38046]: xen-03 JobId 817: ClientAfterJob: Logical volume "srv-node01-s" successfully removed Apr 06 14:16:34 xen-03 bareos-fd[38045]: xen-03 (100): runscript.c:301-817 runscript OK Apr 06 14:16:34 xen-03 bareos-fd[38045]: xen-03 (100): jcr.c:184-817 write_last_jobs seek to 192 Apr 06 14:16:34 xen-03 bareos-fd[38045]: xen-03 (100): dir_cmd.c:570-0 Done with free_jcr
