/var/www/(Del)hsihk.com/wp-content/plugins/backupbuddy/views/migrate-home.php


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
<script type="text/javascript">
    jQuery(document).ready(function() {
        
        jQuery( '.pb_backupbuddy_hoveraction_migrate' ).click( function(e) {
            tb_show( 'BackupBuddy', '<?php echo pb_backupbuddy::ajax_url'migration_picker' ); ?>&callback_data=' + jQuery(this).attr('rel') + '&migrate=1&TB_iframe=1&width=640&height=455', null );
            return false;
        });
        
        jQuery( '.pb_backupbuddy_hoveraction_hash' ).click( function(e) {
            tb_show( 'BackupBuddy', '<?php echo pb_backupbuddy::ajax_url'hash' ); ?>&callback_data=' + jQuery(this).attr('rel') + '&TB_iframe=1&width=640&height=455', null );
            return false;
        });
        
        jQuery( '.pb_backupbuddy_hoveraction_send' ).click( function(e) {
            <?php if ( pb_backupbuddy::$options['importbuddy_pass_hash'] == '' ) { ?>
                alert( 'You must set an ImportBuddy password via the BackupBuddy settings page before you can send this file.' );
                return false;
            <?php ?>
            tb_show( 'BackupBuddy', '<?php echo pb_backupbuddy::ajax_url'destination_picker' ); ?>&callback_data=' + jQuery(this).attr('rel') + '&sending=1&TB_iframe=1&width=640&height=455', null );
            return false;
        });
        
        jQuery( '.pb_backupbuddy_get_importbuddy' ).click( function(e) {
            <?php
            
if ( pb_backupbuddy::$options['importbuddy_pass_hash'] == '' ) {
                
//echo 'alert(\'' . __( 'Please set an ImportBuddy password on the BackupBuddy Settings page to download this script. This is required to prevent unauthorized access to the script when in use.', 'it-l10n-backupbuddy' ) . '\');';
                
?>
                
                var password = prompt( '<?php _e'To download, enter a password to lock the ImportBuddy script from unauthorized access. You will be prompted for this password when you go to importbuddy.php in your browser. Since you have not defined a default password yet this will be used as your default and can be changed later from the Settings page.''it-l10n-backupbuddy' ); ?>' );
                if ( ( password != null ) && ( password != '' ) ) {
                    window.location.href = '<?php echo pb_backupbuddy::ajax_url'importbuddy' ); ?>&p=' + encodeURIComponent( password );
                }
                if ( password == '' ) {
                    alert( 'You have not set a default password on the Settings page so you must provide a password here to download ImportBuddy.' );
                }
                
                return false;
                <?php
            
} else {
                
?>
                var password = prompt( '<?php _e'To download, either enter a new password for just this download OR LEAVE BLANK to use your default ImportBuddy password (set on the Settings page) to lock the ImportBuddy script from unauthorized access.''it-l10n-backupbuddy' ); ?>' );
                if ( password != null ) {
                    window.location.href = '<?php echo pb_backupbuddy::ajax_url'importbuddy' ); ?>&p=' + encodeURIComponent( password );
                }
                return false;
                <?php
            
}
            
?>
            return false;
        });
        

        
        jQuery( '.pb_backupbuddy_hoveraction_note' ).click( function(e) {
            
            var existing_note = jQuery(this).parents( 'td' ).find('.pb_backupbuddy_notetext').text();
            if ( existing_note == '' ) {
                existing_note = 'My first backup';
            }
            
            var note_text = prompt( '<?php _e'Enter a short descriptive note to apply to this archive for your reference. (175 characters max)''it-l10n-backupbuddy' ); ?>', existing_note );
            if ( ( note_text == null ) || ( note_text == '' ) ) {
                // User cancelled.
            } else {
                jQuery( '.pb_backupbuddy_backuplist_loading' ).show();
                jQuery.post( '<?php echo pb_backupbuddy::ajax_url'set_backup_note' ); ?>', { backup_file: jQuery(this).attr('rel'), note: note_text }, 
                    function(data) {
                        data = jQuery.trim( data );
                        jQuery( '.pb_backupbuddy_backuplist_loading' ).hide();
                        if ( data != '1' ) {
                            alert( "<?php _e('Error''it-l10n-backupbuddy' );?>: " + data );
                        }
                        javascript:location.reload(true);
                    }
                );
            }
            return false;
        });
        
    }); // end ready.
    
    
    
    
    function pb_backupbuddy_selectdestination( destination_id, destination_title, callback_data, delete_after, mode ) {
        if ( 'destination' == mode ) { // Normal destination send.
            triggerText = 'manual';
        } else if ( 'migration' == mode ) { // Migration.
            triggerText = 'migration';
        } else { // Unknown mode.
            alert( 'Error #388484: Unknown mode `' + mode + '`.' );
            return false;
        }
        
        if ( callback_data != '' ) {
            if ( callback_data == 'importbuddy.php' ) {
                window.location.href = '<?php echo pb_backupbuddy::page_url(); ?>&destination=' + destination_id + '&destination_title=' + destination_title + '&callback_data=' + callback_data;
                return false;
            }
            jQuery.post( '<?php echo pb_backupbuddy::ajax_url'remote_send' ); ?>', { destination_id: destination_id, destination_title: destination_title, file: callback_data, trigger: triggerText, send_importbuddy: '1' }, 
                function(data) {
                    data = jQuery.trim( data );
                    if ( data.charAt(0) != '1' ) {
                        alert( "<?php _e("Error starting remote send of file to migrate"'it-l10n-backupbuddy' ); ?>:" + "\n\n" + data );
                    } else {
                        if ( 'migration' == mode ) {
                            window.location.href = '<?php echo pb_backupbuddy::page_url(); ?>&destination=' + destination_id + '&destination_title=' + destination_title + '&callback_data=' + callback_data;
                            return;
                        }
                        alert( "<?php _e('Your file has been scheduled to be sent now. It should arrive shortly.''it-l10n-backupbuddy' ); ?> <?php _e'You will be notified by email if any problems are encountered.''it-l10n-backupbuddy' ); ?>\n\n" + data.slice(1) );
                    }
                }
            );
            
            /* Try to ping server to nudge cron along since sometimes it doesnt trigger as expected. */
            jQuery.post( '<?php echo admin_url('admin-ajax.php'); ?>',
                function(data) {
                }
            );

        } else {
            window.location.href = '<?php echo pb_backupbuddy::page_url(); ?>&custom=remoteclient&destination_id=' + destination_id;
        }
    }
    
    
    
</script>
<style>
    .backupbuddyFileTitle {
        //color: #0084CB;
        color: #000;
        font-size: 1.2em;
    }
</style>

<?php
if ( pb_backupbuddy::$options['importbuddy_pass_hash'] == '' ) { // NO HASH SET.
    
echo '<span class="pb_label pb_label">Important</span> <b>Set an ImportBuddy password on the <a href="';
        if ( 
is_network_admin() ) {
            echo 
network_admin_url'admin.php' );
        } else {
            echo 
admin_url'admin.php' );
        }
        echo 
'?page=pb_backupbuddy_settings">Settings</a> page before attempting to Migrate to a new server with the link in the backup list.
    </b><br><br>'
;
}
?>


The best way to Restore or Migrate your site is by using a standalone PHP script named <b>importbuddy.php</b>. This file is run without first
installing WordPress, in combination with your backup ZIP file will allow you to restore this server or to a new server entirely. Sites may be
restored to a new site URL or domain.
You should keep a copy of importbuddy.php for future restores.  It is also stored within backup ZIP files for your convenience. importbuddy.php files are not
site/backup specific.
<br><br>
<ol>
    <li>
        <a id="pb_backupbuddy_downloadimportbuddy" href="<?php echo pb_backupbuddy::ajax_url'importbuddy' ); ?>" class="button button-primary pb_backupbuddy_get_importbuddy">Download importbuddy.php</a> or
        <a id="pb_backupbuddy_sendimportbuddy" href="" rel="importbuddy.php" class="button button-primary pb_backupbuddy_hoveraction_send">Send importbuddy.php to a Destination</a>
    </li>
    <li>
        Download a backup zip file from the list below or send it directly to a destination by selecting "Send file" when hovering over a backup below.
    </li>
    <li>
        Upload importbuddy.php & the downloaded backup zip file to the destination server directory where you want your site restored.
        <ul style="list-style-type: circle; margin-left: 20px; margin-top: 8px;">
            <li>
                Upload these into the FTP directory for your site's web root such as /home/buddy/public_html/.
                If you want to restore into a subdirectory, put these files in it.
            </li>
            <li>
                WordPress should not be installed prior to the restore. You should delete it if it already exists.
            <li>
                Full backups should be restored before restoring database only backups.
            </li>
        </ul>
    </li>
    <li>Navigate to the uploaded importbuddy.php URL in your web browser (ie http://your.com/importbuddy.php).</li>
    <li>Follow the on-screen directions until the restore / migration is complete.</li>
</ol>


<?php
/*
<br>
<h3>Database Rollback</h3>
You may roll back the database on this site to a database contained in a backup (full or database only) by selecting the "Rollback Database" option when
hovering below. This lets you easily undo changes made to the site. You will be given the opportunity to verify the rollback was successful
before making it permanent.
<br><br><br>
*/
?>
<br><br>


<h3 id="pb_backupbuddy_restoremigratelisttitle">Hover Backup for Additional Options</h3>
<?php


$listing_mode 
'restore_migrate';
require_once( 
'_backup_listing.php' );


echo 
'<br><br>';





echo 
'<br><br><br><br><br><br><br><br><br><br><br>';
echo 
'<small>';
if ( 
pb_backupbuddy::$options['importbuddy_pass_hash'] == '' ) {
    echo 
'<a class="description" onclick="alert(\'' __'Please set a RepairBuddy password on the BackupBuddy Settings page to download this script. This is required to prevent unauthorized access to the script when in use.''it-l10n-backupbuddy' ) . '\'); return false;" href="" style="text-decoration: none;" title="' __'Download the troubleshooting & repair script, repairbuddy.php''it-l10n-backupbuddy' ) . '">';
} else {
    echo 
'<a class="description" href="' admin_url'admin-ajax.php' ) . '?action=pb_backupbuddy_backupbuddy&function=repairbuddy" style="text-decoration: none;" title="' __('Download the troubleshooting & repair script, repairbuddy.php''it-l10n-backupbuddy' ) . '">';
}
echo 
__'Download RepairBuddy troubleshooting & repair tool.''it-l10n-backupbuddy' ) . '</a>';
echo 
'</small>';



// Handles thickbox auto-resizing. Keep at bottom of page to avoid issues.
if ( !wp_script_is'media-upload' ) ) {
    
wp_enqueue_script'media-upload' );
    
wp_print_scripts'media-upload' );
}
?>