Yarnman Photon Powered (YM-PH) - Backup and Restore Guide
Backup
ym-backup-setup.sh
Sets up the local backup service account on the yarnman node, and the passphrase used on the backup
yarnman@node1 [ ~ ]$ sudo ym-backup-setup.sh
Starting yarnman ph4 backup
Backup password not set
Set Backup password:
Backup password (again):
Clevis not setup
using local backup password
no backup configuration file found creating
yarnman@node1 [ ~ ]$
No login access is available to the backup service account
ym-backup-actions.sh
all the backup commands are done via the script above
Setup sftp as the backup method and ssh public keys
yarnman@node1 [ ~ ]$ sudo ym-backup-actions.sh -p sftp -a sftp-user-setup
backup config found
PROFILE_NAME_VAR = sftp
ACTION_VAR = sftp-user-setup
RESTORECOMMIT =
RESTORE_IP =
RESTORE_PATH =
settting sftp mode
profile mode :yarnman-sftp
creating keys for ym-backup-user
public key for ssh/sftp
ssh-rsa ****LongStringForPubKey****
yarnman@node1 [ ~ ]$
Copy ssh pub key to sftp server
if ssh access is available to the SFTP server you can copy the ssh public key for login, otherwise provide the key to your SFTP Administrator.
yarnman@node1 [ ~ ]$ su
Password:
yarnman@node1 [ /var/home/yarnman ]# sudo -u ym-backup-user ssh-copy-id -i /home/ym-backup-user/.ssh/id_rsa.pub sftpbackup@10.101.10.86
/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "/home/ym-backup-user/.ssh/id_rsa.pub"
The authenticity of host '10.101.10.86 (10.101.10.86)' can't be established.
ED25519 key fingerprint is SHA256:****j7t+o1aQu5FoWlxS0uhKzCe414jt3****
This key is not known by any other names
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed
/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys
Authorized uses only. All activity may be monitored and reported.
sftpbackup@10.101.10.86's password:
Number of key(s) added: 1
Setup SFTP destination for backup
the script will prompt for backup path, ip address and userid to the SFTP server
you may be prompted for username/password if the SSH pub key hasn’t been added to the SFTP server, this is OK for the initial setup, however scheduled/automated backups will fail
Check if backups exist at location
for first time configuration no backups will be available, nor a backup repository which will be setup in the next section.
Initialise the repository
the password used from the initial ym-backup-setup.sh
will automatically be used
Initialising can only be preformed once to a repository, an error will occur if it exists already.
List backups (snapshots)
list all backups available , on a new repository this will be blank
Manual Backup
preform a manual backup
Schedule
By default the schedule is setup to backup at 1am UTC every day, This can be modified in the config file with as the root user
Restore backup
To restore a snapshot to an existing node.
List the snapshots available as shown earlier to restore the required snapshot.
the restore script will create a Local backup before starting the restore in the event you need to rollback.
If you are restoring a node in a multi node deployment you will see an additional message of
This is to allow replication to all nodes, to prevent any schedule jobs/ reports from rerunning from the last backup
Rebuild Disaster recovery
Pre-Req
Deploy new OVA with same version as the backup
Setup as a new install (eg Configure with ip, user/pass, generate certificates if prompted)
install yarnman
confirm can reach appadmin webpage, Do not Login or Accept the EULA as we will restore over this.
Setup backup to same repo for the node to be restored, Do Not initiate the repo or preform a backup
Run the following, Refer to previous detailed command instructions if required
The restore script will warn we are restoring to a different node, Continue.
Follow instructions after the restore completes.
Alternate Manual Method (not recommended)
*** snapshot command doesnt work in manual mode yet, also requires sudo ym-backup-setup.sh
to be run ?