Closed noeyhuy closed 4 years ago
As far as I can tell from your report you have not copied over the datastore. Exports only contain metadata information needed to create a restore / nbd mount from a backup. If you want to restore from another host, you must make the data backend available to the other host. Either by rsyncing it over or by give nfs / something else mount to the other host. The usecase here is that we use an s3 store as data backend and create backy2 metadata exports and store those too in a s3 bucket.
i understand thank you.
hi. Two backy2 servers are up and running. Backupdata exported from server 1. Error occurred while importing and restoring server 2. How do I fix it? DB is using postgresql.
server1 metadata
[root@backy2_server1 ~]# backy2 stats INFO: $ /usr/local/bin/backy2 stats +----------------------------+--------------------------------------+--------------+-------------+-------------+-------------+-------------+---------------+----------------+-------------+--------------+--------------+---------------+--------------+ | date | uid | name | size bytes | size blocks | bytes read | blocks read | bytes written | blocks written | bytes dedup | blocks dedup | bytes sparse | blocks sparse | duration (s) | +----------------------------+--------------------------------------+--------------+-------------+-------------+-------------+-------------+---------------+----------------+-------------+--------------+--------------+---------------+--------------+ | 2020-01-02 13:13:38.292383 | f807adce-2d15-11ea-89be-525400e5d9c4 | full_monday | 13002932224 | 3101 | 13002932224 | 3101 | 3083403264 | 736 | 0 | 0 | 9919528960 | 2365 | 121 | | 2020-01-02 13:16:31.688367 | 7a69d986-2d16-11ea-b1ab-525400e5d9c4 | diff_tuesday | 18004312064 | 4293 | 18004312064 | 4293 | 111411200 | 27 | 3036676096 | 724 | 14856224768 | 3542 | 76 | +----------------------------+--------------------------------------+--------------+-------------+-------------+-------------+-------------+---------------+----------------+-------------+--------------+--------------+---------------+--------------+ INFO: Backy complete.
server1 export
[root@backy2_server1 ~]# backy2 export f807adce-2d15-11ea-89be-525400e5d9c4 full_monday INFO: $ /usr/local/bin/backy2 export f807adce-2d15-11ea-89be-525400e5d9c4 full_monday INFO: Backy complete.
server1 -> server2 (export file rsync)
[root@backy2_server1 ~]# rsync -av full_monday root@192.168.30.199:/home/target/ root@192.168.30.199's password: sending incremental file list full_monday
sent 349,523 bytes received 35 bytes 139,823.20 bytes/sec total size is 349,350 speedup is 1.00
server2 import
[root@backy2_server2 target]# backy2 import full_monday INFO: $ /usr/local/bin/backy2 import full_monday INFO: Backy complete.
server2 metadata
[root@backy2_server2 ~]# backy2 ls INFO: $ /usr/local/bin/backy2 ls +---------------------+-------------+---------------+------+-------------+--------------------------------------+-------+-----------+------+ | date | name | snapshot_name | size | size_bytes | uid | valid | protected | tags | +---------------------+-------------+---------------+------+-------------+--------------------------------------+-------+-----------+------+ | 2020-01-02 13:11:36 | full_monday | | 3101 | 13002932224 | f807adce-2d15-11ea-89be-525400e5d9c4 | 1 | 0 | | +---------------------+-------------+---------------+------+-------------+--------------------------------------+-------+-----------+------+ INFO: Backy complete.
restore error
[root@backy2_server2 ~]# backy2 restore f807adce-2d15-11ea-89be-525400e5d9c4 file:///home/restore/test.img INFO: $ /usr/local/bin/backy2 restore f807adce-2d15-11ea-89be-525400e5d9c4 file:///home/restore/test.img ERROR: Unexpected exception ERROR: object of type 'NoneType' has no len() Traceback (most recent call last): File "/usr/local/lib/python3.6/site-packages/backy2-2.9.18-py3.6.egg/backy2/scripts/backy.py", line 583, in main func(**func_args) File "/usr/local/lib/python3.6/site-packages/backy2-2.9.18-py3.6.egg/backy2/scripts/backy.py", line 42, in restore backy.restore(version_uid, target, sparse, force) File "/usr/local/lib/python3.6/site-packages/backy2-2.9.18-py3.6.egg/backy2/backy.py", line 294, in restore assert len(data) == block.size TypeError: object of type 'NoneType' has no len() INFO: Backy failed.