D3backup: General Command Line Use

 


In AIX or Linux here are some common command line uses of d3backup


1) To see if d3backup is currently running:


d3backup -q

d3backup is running. Process id 6066. Use -w to watch it go.

 

Normally, d3backup runs in the background. Either as a cron job or triggered by the completion of the night process.


2) Watch d3backup live from AIX or Linux as its running:


d3backup -w
1 472 mds > adv.data.wed > IH > IH
1 473 mds > adv.data.wed > tcl.stack.old
1 474 mds > adv.data.wed > tcl.stack.old > tcl.stack.old
1 475 mds > adv.data.wed > CRX
1 476 mds > adv.data.wed > CRX > CRX
1 477 mds > adv.data.wed > TASK
1 478 mds > adv.data.wed > TASK > TASK
1 479 mds > adv.data.wed > RRD
1 480 mds > adv.data.wed > RRD > RRD
1 481 mds > adv.data.wed > POINTER-FILE

 

Do a Ctrl-C to break out of watching it live


If d3backup is running you can watch it with the –w option. This shows you the actual file-save output that is normally viewed in Pick on the console. The only other way to watch it would be to start it on the console and sit there or tandem to that port from within Pick itself.


3) Watch the last full file-save run of d3backup:


d3backup –o

 

The –o (oh, not zero) option shows you the entire file-save run. If its running now, it shows you from the beginning. If its not currently running, it shows you the last time it ran. Since it paginates using the “more” command for you, just remember, a space bar shows you the next full screen of output but the RETURN key shows you just one more line of output. And the “q” quits out of the display back to the command prompt.


4) Show me the help page:


d3backup -h

d3backup [-chklLqmVorRwW] [-i hh:mm] [-e admin@host.com] [-f host,user,password]

 

 Perform a D3 file-save to a virtual tape drive. It expects the use of

 BP FASTSAVE in the DM account to perform the actual file-save.

Messages are logged to syslog (/var/log/messages). The virtual tape

 file is then archived to /ptape and renamed as a day of the week.

 Optionally, the archive file may be FTP-ed to another server and an email sent.

 

 Options:

 b = Background job, sleeps until /tmp/wakeupd3backup appears then performs file-save.

 c = Specify alternate configuration file, default is /etc/d3backup.conf.

 d = delete a specific file-save from local archive. Example: d3backup -d monday

 e = Email address to send backup complete message.

 f = Ftp the file-save to the host using userid and password after the save.

 h = Display this help message.

 i = install d3backup as a daily background job at the specified time.

 j = just archive the OS system files specified in the conf file.

 k = kill a running d3backup ftp process.

 l = List existing file-saves from archive with date and size in megabytes.

 L = List existing file-saves from archive with date and size in bytes.

 m = Move existing archived file-save set of files to ftp location. Example: d3backup -m sunday

 M = Move single file from existing archived file-save to ftp location. Example: d3backup -M sunday-3

 n = choose a custom name instead of monday or tuesday, etc. Example: -n laborday

 o = View file-save output from beginning of current or last save.

 q = query if a d3backup is currently running.

 p = prune out old file-saves from local archive.

 r = List existing file-saves from remote archive.

 R = Retrieve a file-save from remote archive. Example: d3backup -R saturday

 s = show crontab entry and exit.

 t = test email mechanism only, no file-save

 V = Show program version and exit (Ver. 3.82).

 w = Watch live file-save or end of last file-save. Ctrl-C to break out.

 W = Watch live file-save only. Ctrl-C to break out.

 x = compare byte counts of local backup with remote. Example: -x monday, defaults to most recent

 X = compare byte counts of local backup with remote. Retransmit files with mismatched byte counts.

 z = backup and ftp system files only

 

5) List all the file-saves that d3backup has stored locally in AIX or Linux:

 

d3backup -l

/backups/fs20140722 Tue Jul 22 22:01:12 2014 763 Mb

/backups/fs20140721 Mon Jul 21 22:01:12 2014 762 Mb

/backups/fs20140720 Sun Jul 20 22:01:12 2014 762 Mb

/backups/fs20140719 Sat Jul 19 22:01:13 2014 762 Mb

/backups/fs20140718 Fri Jul 18 22:01:12 2014 762 Mb

/backups/fs20140717 Thu Jul 17 22:01:12 2014 762 Mb

/backups/fs20140716 Wed Jul 16 22:01:11 2014 762 Mb

 

Note: Use –L for bytes rather than Mb.

 

6) List all the file-saves remotely stored on the ftp server:

 

d3backup -r

backup2.pfinders.com/system_files.tar.gz Jul 23, 2014 24319 bytes

backup2.pfinders.com/fs20140722 Jul 23, 2014 781728243 bytes

backup2.pfinders.com/fs20140721 Jul 22, 2014 780671127 bytes

backup2.pfinders.com/fs20140720 Jul 21, 2014 780622054 bytes

backup2.pfinders.com/fs20140719 Jul 20, 2014 780622091 bytes

backup2.pfinders.com/fs20140718 Jul 19, 2014 780624256 bytes

backup2.pfinders.com/fs20140717 Jul 18, 2014 780488378 bytes

backup2.pfinders.com/fs20140716 Jul 17, 2014 780322373 bytes

backup2.pfinders.com/fs20140715 Jul 16, 2014 780115156 bytes

backup2.pfinders.com/fs20140714 Jul 15, 2014 780065490 bytes

 

Notice that the sizes are in bytes for –r .

 

7) Verify if the last d3backup FTP was successful with:

 

d3backup –x

 

If no output is returned then the local copy of the last file-save and the remote copy on the ftp server are the same. Each component file in the file-save “set” is compared for size in bytes. If each file matches size both locally and remotely then it is assumed to be the same. You will only see output on corrupted files.

 

If one or more files are corrupted on #7 above, use –X to retransmit them automatically.

 

8) Download a file-save set from the FTP server

 

d3backup –R fs20140714

 

This will begin the ftp download of the file-save set of files associated with “fs20140714” and store them locally. Once it completes, it should appear with the command “d3backup –l” that displays the local archive area.

 

9) To upload a file-save set to the FTP server by hand:

 

d3backup –m fs20140714

 

If you perform a file-save by hand and wish for d3backup to upload it to the ftp server, this is the way. “m” stands for “move” but its really “copy” in this context.

 

10) If you are low on space and want to delete a file-save set from the local archive area:

 

d3backup –d fs20140714