Skip to content

Instantly share code, notes, and snippets.

@chgeuer
Last active September 19, 2018 15:06
Show Gist options
  • Save chgeuer/02ff7aeeca8971ff25fe1331dbd6535e to your computer and use it in GitHub Desktop.
Save chgeuer/02ff7aeeca8971ff25fe1331dbd6535e to your computer and use it in GitHub Desktop.

Live video of problem at https://asciinema.org/a/dT41HGCq4nuMfoItz212g3iMD

Manually create named pipe

# mkfifo /tmp/restorepipe --mode=0600
# ll /tmp/restorepipe
prw------- 1 root root 0 Sep 19 10:31 /tmp/restorepipe

Copy single stripe of full backup into named pipe

# cat ase-backup-20180918-062634-AZU-full-1-1.cdmp > /tmp/restorepipe
# 

Trigger restore on ASE side

load database AZU from '/tmp/restorepipe'
go

Output

Backup Server session id is: 136. Use this value when executing the 'sp_volchanged' system stored procedure after fulfilling any volume change request from the Backup Server.
Backup Server: 6.28.1.1: Dumpfile name 'AZU1826105A9A    ' section number 1 mounted on device '/tmp/restorepipe'
Backup Server: 4.166.1.1: Using dbiosize of 131072 bytes for device /tmp/restorepipe.
Backup Server: 4.165.1.1: Using iocount of 2 for device /tmp/restorepipe.
Backup Server: 4.166.1.2: Using zonesize of 262144 bytes for device /tmp/restorepipe.
Backup Server: 4.166.1.3: Using blocksize of 65536 bytes for device /tmp/restorepipe.
Backup Server: 4.165.1.2: Using numzones of 3 for device /tmp/restorepipe.
Backup Server: 4.165.1.3: Using archcnt of 1 for device /tmp/restorepipe.
Backup Server: 4.165.1.4: Using dbdevcnt of 2 for device /tmp/restorepipe.
Backup Server: 4.166.1.4: Using pagesize of 2048 bytes for device /tmp/restorepipe.
Backup Server: 4.188.1.1: Database AZU: 8196 kilobytes (2%) LOADED.
Backup Server: 4.188.1.1: Database AZU: 36870 kilobytes (9%) LOADED.
Backup Server: 4.188.1.1: Database AZU: 74760 kilobytes (19%) LOADED.
Backup Server: 4.188.1.1: Database AZU: 117770 kilobytes (29%) LOADED.
Backup Server: 4.188.1.1: Database AZU: 160780 kilobytes (40%) LOADED.
Backup Server: 4.188.1.1: Database AZU: 203790 kilobytes (51%) LOADED.
Backup Server: 4.188.1.1: Database AZU: 246800 kilobytes (62%) LOADED.
Backup Server: 4.188.1.1: Database AZU: 289810 kilobytes (73%) LOADED.
Backup Server: 4.188.1.1: Database AZU: 332820 kilobytes (84%) LOADED.
Backup Server: 4.188.1.1: Database AZU: 375830 kilobytes (95%) LOADED.
Backup Server: 4.188.1.1: Database AZU: 393240 kilobytes (100%) LOADED.
Backup Server: 4.188.1.1: Database AZU: 393248 kilobytes (100%) LOADED.

Backup Server: 4.145.2.81: [95] Error for database/archive device while working on stripe device '/tmp/restorepipe'. 
                          Error reading from archive device /tmp/restorepipe. 
                          Attempted to read 2048 bytes, but 0 bytes were read. The dump is probably bad.

Backup Server: 4.9.2.6: Label validation error: read returned -1 reading label. Read:n

Backup Server: 6.32.2.2: /tmp/restorepipe: volume not valid or not requested (server: , session id: 136.)
Backup Server: 1.14.2.3: Unrecoverable I/O or volume error.  This DUMP or LOAD session must exit.
Backup Server: 6.32.2.3: /tmp/restorepipe: volume not valid or not requested (server: , session id: 136.)
Backup Server: 1.14.2.4: Unrecoverable I/O or volume error.  This DUMP or LOAD session must exit.

Msg 8009, Level 16, State 1:
Server 'AZ3', Line 1:
Error encountered by Backup Server.  Please refer to Backup Server messages for details.

'with verifyonly'

1> load database AZU from '/home/chgeuer/ase_backup_dotnet/ase-backup-20180918-062634-AZU-full-1-1.cdmp' with verifyonly
2> go
Backup Server session id is: 28. Use this value when executing the 'sp_volchanged' system stored procedure after fulfilling any volume change request from the Backup Server.
Backup Server: 6.28.1.1: Dumpfile name 'AZU1826105A9A    ' section number 1 mounted on disk file '/home/chgeuer/ase_backup_dotnet/ase-backup-20180918-062634-AZU-full-1-1.cdmp'
Backup Server: 4.166.1.1: Using dbiosize of 131072 bytes for device /home/chgeuer/ase_backup_dotnet/ase-backup-20180918-062634-AZU-full-1-1.cdmp.
Backup Server: 4.165.1.1: Using iocount of 2 for device /home/chgeuer/ase_backup_dotnet/ase-backup-20180918-062634-AZU-full-1-1.cdmp.
Backup Server: 4.166.1.2: Using zonesize of 262144 bytes for device /home/chgeuer/ase_backup_dotnet/ase-backup-20180918-062634-AZU-full-1-1.cdmp.
Backup Server: 4.166.1.3: Using blocksize of 65536 bytes for device /home/chgeuer/ase_backup_dotnet/ase-backup-20180918-062634-AZU-full-1-1.cdmp.
Backup Server: 4.165.1.2: Using numzones of 3 for device /home/chgeuer/ase_backup_dotnet/ase-backup-20180918-062634-AZU-full-1-1.cdmp.
Backup Server: 4.165.1.3: Using archcnt of 1 for device /home/chgeuer/ase_backup_dotnet/ase-backup-20180918-062634-AZU-full-1-1.cdmp.
Backup Server: 4.165.1.4: Using dbdevcnt of 1 for device /home/chgeuer/ase_backup_dotnet/ase-backup-20180918-062634-AZU-full-1-1.cdmp.
Backup Server: 4.166.1.4: Using pagesize of 2048 bytes for device /home/chgeuer/ase_backup_dotnet/ase-backup-20180918-062634-AZU-full-1-1.cdmp.

General:
        This is a full database dump
        Name: AZU
        Id: 4
        Dump date: Sep 18 2018  6:26:34:876AM
        Database page size:  2048.
        Number of pages: 196608
        Checkpoint RID: (144539, 0)
        Next object id: 608002166
        Sort order id: 50
        Status: 0
        Charset id: 1
        Database durability: UNDEFINED
        Compression level: N/A
        Database encrypted: NO
        Database Encryption Key: N/A

Versions:
        Adaptive Server version: Adaptive Server Enterprise/16.0 SP03 PL05/EBF 28238 SMP/P/x86_64/SLES 11.1/ase160sp03pl05x/3455/64-b
        Backup Server version: ASE backupserver/16.0 SP03 PL05/EBF 28238/P/x86_64/SLES 11.1/ase160sp03pl05x/6039/64-bit/OPT/Fri Ju

        Database log version: 7
        Database upgrade version: 41

Dump timestamps:
        Full: 0x0000 00000000
        Cumulative: 0x0000 00000000
        Delta: 0x0000 00000000

Sysusages:
        segmap: 0x00000003 lstart=0 vstart=[3, 0]  lsize=131072 unrsvd=121094
        segmap: 0x00000004 lstart=131072 vstart=[4, 0]  lsize=65536 unrsvd=63135

        Number of logical pages: 196608 (384 MB)
        Number of physical pages: 196608 (384 MB)

Sysdevices:
        devtype=0, vdevno=3, devname=AZU_data_01,
                physname=/sybase/AZ3/sapdata_1/AZU_data_01.dat,
                devsize=131072, dbdevsize=131072, vstart=0,
                devstat=2, devstat2=1
        devtype=0, vdevno=4, devname=AZU_log_01,
                physname=/sybase/AZ3/sapdata_1/AZU_log_01.dat,
                devsize=65536, dbdevsize=65536, vstart=0,
                devstat=2, devstat2=1

Sysdatabases:
        status=0x0000, crdate=Sep 17 2018  4:46:08:250PM,
                dumptrdate=Sep 18 2018  6:23:36:046AM, status2=0x0000,
                audflags=0x0000, deftabaud=0, defvwaud=0, defpraud=0,
                def_remote_type=0, status3=0x20000, status4=0x4000,
                durablility=1, lobcomp_lvl=0, inrowlen=0,
                dcompdefault=1 status5=0x0020

Sysattributes:
                flmode: 0x0000

Features found in the database or transaction dump header:

  ID =  4 : 15.7.0.000  : Database has system catalog changes made in 15.7 GA
  ID =  7 : 15.7.0.020  : Database has system catalog changes made in 15.7 ESD#02
  ID = 11 : 15.7.0.100  : Database has the Sysdams catalog
  ID = 23 : 16.0.03.00  : Extended DBINFO
Backup Server: 4.188.1.1: Database AZU: 393248 kilobytes (100%) VERIFIED.
Backup Server: 4.190.1.1: Database AZU: Verification reported 0 errors.
Backup Server: 4.145.2.81: [95] Error for database/archive device while working on stripe device '/home/chgeuer/ase_backup_dotnet/ase-backup-20180918-062634-AZU-full-1-1.cdmp'. Error reading from archive device /home/chgeuer/ase_backup_dotnet/ase-backup-20180918-062634-AZU-full-1-1.cdmp. Attempted to read 2048 bytes, but 0 bytes were read. The dump is probably bad.
Backup Server: 4.9.2.6: Label validation error: read returned -1 reading label. Read:n
Backup Server: 6.32.2.2: /home/chgeuer/ase_backup_dotnet/ase-backup-20180918-062634-AZU-full-1-1.cdmp: volume not valid or not requested (server: , session id: 28.)
Backup Server: 1.14.2.3: Unrecoverable I/O or volume error.  This DUMP or LOAD session must exit.
Backup Server: 6.32.2.3: /home/chgeuer/ase_backup_dotnet/ase-backup-20180918-062634-AZU-full-1-1.cdmp: volume not valid or not requested (server: , session id: 28.)
Backup Server: 1.14.2.4: Unrecoverable I/O or volume error.  This DUMP or LOAD session must exit.
Msg 8009, Level 16, State 1:
Server 'AZ3', Line 1:
Error encountered by Backup Server.  Please refer to Backup Server messages for details.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment