Blob


1 version=pmwiki-2.3.20 ordered=1 urlencoded=1
2 agent=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36
3 author=SplinTer
4 charset=UTF-8
5 csum=
6 ctime=1703975767
7 host=138.43.182.133
8 name=Almanack.DumpBackupWithSCP
9 rev=20
10 targets=
11 text=(:title Dump Backup With SCP:)%0a%0athis is a custom shell script to run dump command for backup to remote server with the SCP Command with using a private openssh key! please note that you will need to setup private.key for your scp to use without using a password%0a%0a%25note%25'''NOTE:''' The above command copies the backup from local host to remote host to store your backup. This requires ssh without password (ssh keys) and doas without password which is a security concern%0a%0a%25note%25'''private.key NOTE:''' The Solution: When you get to the public key screen in creating your key pair in puttygen, copy the public key and paste it into a text file with the extension .pub. You will save you sysadmin hours of frustration reading posts like this%0a%0aBegin of script%0a----%0a%0a[@%0a#!/bin/sh %0a#Author SplinTer@NaStYcOdE.Com Free Unix Tech Support At support@nastycode.com%0a# Join Us On IRC At IRC.NaStYcOdE.COM Channel #NaStYcOdE%0aSHELL=/bin/sh%0aPATH=/bin:/sbin19:/usr/bin:/usr/sbin19:/sbin/:/usr/sbin%0aHOME=/root%0aMAILTO="splinter@NaStYcOdE.com"%0aHOSTNAME=NaStYcOdE.COM%0aBACKUP_DESTINATION=SplinTer@host.planetofnix.com%0aDATE=$(date "+%25Y%25m%25d")%0aLOCALBACKUP=/home/backup/$DATE%0a%0aecho%0acd /home/backup/%0aecho%0amkdir $DATE%0aecho%0acd $LOCALBACKUP%0aecho "Curremt Working Backup Directory $LOCALBACKUP on $hostname"%0aecho%0aecho "Partition's Needs Backed Up With OpenBSD Dump And SCP Command"%0aecho%0adf -h%0aecho%0aecho "Current Backup Location $HOSTNAME VPS Folder $LOCALBACKUP"%0aecho%0acd $LOCALBACKUP%0adoas /sbin/dump -0 -a -h 0 -f $LOCALBACKUP/root.dmp / &&%0adoas /sbin/dump -0 -a -h 0 -f $LOCALBACKUP/tmp.dmp /tmp &&%0adoas /sbin/dump -0 -a -h 0 -f $LOCALBACKUP/usr.dmp /usr &&%0adoas /sbin/dump -0 -a -h 0 -f $LOCALBACKUP/usr-X11R6.dmp /usr/X11R6 &&%0adoas /sbin/dump -0 -a -h 0 -f $LOCALBACKUP/usr-local.dmp /usr/local &&%0adoas /sbin/dump -0 -a -h 0 -f $LOCALBACKUP/var.dmp /var &&%0adoas /sbin/dump -0 -a -h 0 -f $LOCALBACKUP/home.dmp /home &&%0aecho "Folder Size Of Backup On $HOSTNAME VPS"%0acd $LOCALBACKUP%0adu -sh%0aecho%0aecho "Uploading to $BACKUP_DESTINATION Backup Server! User Account SplinTer!"%0aecho%0aecho "Uploading to $BACKUP_DESTINATION Going To Take A Hour! Please Keep Calm And Be Patiently Let it Do Its Thing!"%0acd /home/backup%0aecho%0aecho "Starting Upload to Storage VPS Server host.planetofnix.com In Folder /mnt/sd4/a/vps/SplinTer/backup/nastycode.com/$DATE On Storage VPS"%0aecho%0a/usr/bin/scp -r -i private.key /home/backup/* SplinTer@host.planetofnix.com:/mnt/sd4/a/vps/SplinTer/backup/nastycode.com/%0aecho "Backup Directoy File Size On Backup VPS"%0adu -sh /home/backup/$DATE%0aecho%0aecho "Uploading to $BACKUP_DESTINATION Is Complete! File Path On VPS Server /home/backup/sd4/a/vps/SplinTer/backup/nastycode.com/"%0aecho%0aecho%0aecho "Deleteing $HOSTNAME Files From local Backup! Current Directory $LOCALBACKUP"%0arm -fr $LOCALBACKUP%0aecho%0aecho%0aecho "This Bash Script Can Be Run As Ofen As You Wish! I'd Run At Least Weekly! Made By SplinTer@NaStYcOdE.Com"%0a%0a@]
12 time=1713173251
13 title=Dump Backup With SCP
14 author:1713173251=SplinTer
15 diff:1713173251:1705078410:=40,46c40,46%0a%3c doas /sbin/dump -0 -a -h 0 -f $LOCALBACKUP/root.dmp / &&%0a%3c doas /sbin/dump -0 -a -h 0 -f $LOCALBACKUP/tmp.dmp /tmp &&%0a%3c doas /sbin/dump -0 -a -h 0 -f $LOCALBACKUP/usr.dmp /usr &&%0a%3c doas /sbin/dump -0 -a -h 0 -f $LOCALBACKUP/usr-X11R6.dmp /usr/X11R6 &&%0a%3c doas /sbin/dump -0 -a -h 0 -f $LOCALBACKUP/usr-local.dmp /usr/local &&%0a%3c doas /sbin/dump -0 -a -h 0 -f $LOCALBACKUP/var.dmp /var &&%0a%3c doas /sbin/dump -0 -a -h 0 -f $LOCALBACKUP/home.dmp /home &&%0a---%0a> doas /sbin/dump -0 -a -h 0 -f $LOCALBACKUP/root.dmp / %0a> doas /sbin/dump -0 -a -h 0 -f $LOCALBACKUP/tmp.dmp /tmp %0a> doas /sbin/dump -0 -a -h 0 -f $LOCALBACKUP/usr.dmp /usr %0a> doas /sbin/dump -0 -a -h 0 -f $LOCALBACKUP/usr-X11R6.dmp /usr/X11R6 %0a> doas /sbin/dump -0 -a -h 0 -f $LOCALBACKUP/usr-local.dmp /usr/local %0a> doas /sbin/dump -0 -a -h 0 -f $LOCALBACKUP/var.dmp /var %0a> doas /sbin/dump -0 -a -h 0 -f $LOCALBACKUP/home.dmp /home%0a
16 host:1713173251=138.43.182.133
17 author:1705078410=SplinTer
18 diff:1705078410:1704838855:=1,2d0%0a%3c (:title Dump Backup With SCP:)%0a%3c %0a
19 host:1705078410=138.43.182.133
20 author:1704838855=SplinTer
21 diff:1704838855:1704831876:=54c54%0a%3c echo "Starting Upload to Storage VPS Server host.planetofnix.com In Folder /mnt/sd4/a/vps/SplinTer/backup/nastycode.com/$DATE On Storage VPS"%0a---%0a> echo "Starting Upload to Storage VPS Server host.planetofnix.com In Folder /mnt/sd4/a/vps/SplinTer/backup/nastycode.com/ On Storage VPS"%0a
22 host:1704838855=138.43.182.133
23 author:1704831876=SplinTer
24 diff:1704831876:1704669630:=11c11%0a%3c #!/bin/sh %0a---%0a> #!/bin/ksh %0a
25 host:1704831876=138.43.182.133
26 author:1704669630=SplinTer
27 diff:1704669630:1703984196:=1,2c1,2%0a%3c this is a custom shell script to run dump command for backup to remote server with the SCP Command with using a private openssh key! please note that you will need to setup private.key for your scp to use without using a password%0a%3c %0a---%0a> this is a custom shell script to run dump command for backup to remote server with the SCP Command with using a private openssh key! please note that you will need to setup private key for your scp to use without using a password%0a> %0a18,22c18,23%0a%3c HOSTNAME=NaStYcOdE.COM%0a%3c BACKUP_DESTINATION=SplinTer@host.planetofnix.com%0a%3c DATE=$(date "+%25Y%25m%25d")%0a%3c LOCALBACKUP=/home/backup/$DATE%0a%3c %0a---%0a> %0a> hostname=NaStYcOdE.COM%0a> backup_destination=SplinTer@host.planetofnix.com%0a> timestamp=$(date "+%25Y%25m%25d")%0a> dest=/home/backup/$timestamp%0a> %0a26c27%0a%3c mkdir $DATE%0a---%0a> mkdir $timestamp%0a28,29c29,30%0a%3c cd $LOCALBACKUP%0a%3c echo "Curremt Working Backup Directory $LOCALBACKUP on $hostname"%0a---%0a> cd $dest%0a> echo "Curremt Working Backup Directory $dest on $hostname"%0a31c32%0a%3c echo "Partition's Needs Backed Up With OpenBSD Dump And SCP Command"%0a---%0a> echo "Partition's Needs Backed Up With OpenBSD Dump Command"%0a35c36%0a%3c echo "Current Backup Location $HOSTNAME VPS Folder $LOCALBACKUP"%0a---%0a> echo "Current Backup Location $hostname VPS Folder $dest"%0a37,47c38%0a%3c cd $LOCALBACKUP%0a%3c doas /sbin/dump -0 -a -h 0 -f $LOCALBACKUP/root.dmp / %0a%3c doas /sbin/dump -0 -a -h 0 -f $LOCALBACKUP/tmp.dmp /tmp %0a%3c doas /sbin/dump -0 -a -h 0 -f $LOCALBACKUP/usr.dmp /usr %0a%3c doas /sbin/dump -0 -a -h 0 -f $LOCALBACKUP/usr-X11R6.dmp /usr/X11R6 %0a%3c doas /sbin/dump -0 -a -h 0 -f $LOCALBACKUP/usr-local.dmp /usr/local %0a%3c doas /sbin/dump -0 -a -h 0 -f $LOCALBACKUP/var.dmp /var %0a%3c doas /sbin/dump -0 -a -h 0 -f $LOCALBACKUP/home.dmp /home%0a%3c echo "Folder Size Of Backup On $HOSTNAME VPS"%0a%3c cd $LOCALBACKUP%0a%3c du -sh%0a---%0a> cd $dest%0a49c40,50%0a%3c echo "Uploading to $BACKUP_DESTINATION Backup Server! User Account SplinTer!"%0a---%0a> pwd%0a> doas /sbin/dump -0 -a -h 0 -f /home/backup/$timestamp/root.dmp / %0a> doas /sbin/dump -0 -a -h 0 -f /home/backup/$timestamp/tmp.dmp /tmp %0a> doas /sbin/dump -0 -a -h 0 -f /home/backup/$timestamp/usr.dmp /usr %0a> doas /sbin/dump -0 -a -h 0 -f /home/backup/$timestamp/usr-X11R6.dmp /usr/X11R6 %0a> doas /sbin/dump -0 -a -h 0 -f /home/backup/$timestamp/usr-local.dmp /usr/local %0a> doas /sbin/dump -0 -a -h 0 -f /home/backup/$timestamp/var.dmp /var %0a> doas /sbin/dump -0 -a -h 0 -f /home/backup/$timestamp/home.dmp /home%0a> echo "Folder Size Of Backup On $hostname VPS"%0a> cd $dest%0a> du -sh%0a51,52c52%0a%3c echo "Uploading to $BACKUP_DESTINATION Going To Take A Hour! Please Keep Calm And Be Patiently Let it Do Its Thing!"%0a%3c cd /home/backup%0a---%0a> echo "Uploading to $backup_destination Backup Server! User Account SplinTer!"%0a53a54,56%0a> echo "Uploading to $backup_destination Going To Take A Hour! Please Keep Calm And Be Patiently Let it Do Its Thing!"%0a> cd /home/backup%0a> echo%0a58c61%0a%3c du -sh /home/backup/$DATE%0a---%0a> du -sh /home/backup/$timestamp%0a60c63%0a%3c echo "Uploading to $BACKUP_DESTINATION Is Complete! File Path On VPS Server /home/backup/sd4/a/vps/SplinTer/backup/nastycode.com/"%0a---%0a> echo "Uploading to $backup_destination Is Complete! File Path On VPS Server /home/backup/sd4/a/vps/SplinTer/backup/nastycode.com/"%0a63,64c66,67%0a%3c echo "Deleteing $HOSTNAME Files From local Backup! Current Directory $LOCALBACKUP"%0a%3c rm -fr $LOCALBACKUP%0a---%0a> echo "Deleteing $hostname Files From local Backup! Current Directory $dest"%0a> rm -fr $dest%0a68d70%0a%3c %0a
28 host:1704669630=138.43.182.133
29 author:1703984196=SplinTer
30 diff:1703984196:1703984132:=1c1%0a%3c this is a custom shell script to run dump command for backup to remote server with the SCP Command with using a private openssh key! please note that you will need to setup private key for your scp to use without using a password%0a---%0a> this is a custom shell script to run dump command for backup to remote server with the SCP Command! please note that you will need to setup private key for your scp to use without using a password%0a
31 host:1703984196=138.43.182.133
32 author:1703984132=SplinTer
33 diff:1703984132:1703980652:=1,5c1,3%0a%3c this is a custom shell script to run dump command for backup to remote server with the SCP Command! please note that you will need to setup private key for your scp to use without using a password%0a%3c %0a%3c %25note%25'''NOTE:''' The above command copies the backup from local host to remote host to store your backup. This requires ssh without password (ssh keys) and doas without password which is a security concern%0a%3c %0a%3c %25note%25'''private.key NOTE:''' The Solution: When you get to the public key screen in creating your key pair in puttygen, copy the public key and paste it into a text file with the extension .pub. You will save you sysadmin hours of frustration reading posts like this%0a---%0a> this is a custom shell script to run dump command for backup to remote server with the SCP Command! please note that you will need to setup private key for your scp to use without using a password:%0a> %0a> %25note%25'''NOTE:''' The above command copies the backup from local host to remote host to backup remote. This requires ssh without password (ssh keys) and doas without password which is a security concern.:%0a
34 host:1703984132=138.43.182.133
35 author:1703980652=SplinTer
36 diff:1703980652:1703977880:=
37 host:1703980652=138.43.182.133
38 author:1703977880=SplinTer
39 diff:1703977880:1703977541:=
40 host:1703977880=138.43.182.133
41 author:1703977541=SplinTer
42 diff:1703977541:1703977462:=15c15%0a%3c MAILTO="splinter@NaStYcOdE.com"%0a---%0a> MAILTO="root@NaStYcOdE.com"%0a
43 host:1703977541=138.43.182.133
44 author:1703977462=SplinTer
45 diff:1703977462:1703977380:=1,2c1,2%0a%3c this is a custom shell script to run dump command for backup to remote server with the SCP Command! please note that you will need to setup private key for your scp to use without using a password:%0a%3c %0a---%0a> this is a custom shell script to run dump command for backup to remote server with the SCP Command! please not that you will need to setup private key for your scp to use with using a password:%0a> %0a5d4%0a%3c Begin of script%0a
46 host:1703977462=138.43.182.133
47 author:1703977380=SplinTer
48 diff:1703977380:1703977328:=7d6%0a%3c [@%0a
49 host:1703977380=138.43.182.133
50 author:1703977328=SplinTer
51 diff:1703977328:1703977309:=5d4%0a%3c ----%0a
52 host:1703977328=138.43.182.133
53 author:1703977309=SplinTer
54 diff:1703977309:1703977193:=3,5c3,7%0a%3c %25note%25'''NOTE:''' The above command copies the backup from local host to remote host to backup remote. This requires ssh without password (ssh keys) and doas without password which is a security concern.:%0a%3c %0a%3c %0a---%0a> %25note%25'''NOTE:''' The above command pulls the backup from a remote host to the backup location. This requires ssh without password (ssh keys) and doas without password which is a security concern.:%0a> %0a> ----%0a> %0a> [@%0a
55 host:1703977309=138.43.182.133
56 author:1703977193=SplinTer
57 diff:1703977193:1703977144:=0a1%0a> [@%0a
58 host:1703977193=138.43.182.133
59 author:1703977144=SplinTer
60 diff:1703977144:1703976940:=1c1%0a%3c [@%0a---%0a> %25note%25[@%0a5a6%0a> %0a7,8d7%0a%3c %0a%3c [@%0a69d67%0a%3c @]%0a\ No newline at end of file%0a
61 host:1703977144=138.43.182.133
62 author:1703976940=SplinTer
63 diff:1703976940:1703976649:=2,5c2,5%0a%3c this is a custom shell script to run dump command for backup to remote server with the SCP Command! please not that you will need to setup private key for your scp to use with using a password:%0a%3c %0a%3c %25note%25'''NOTE:''' The above command pulls the backup from a remote host to the backup location. This requires ssh without password (ssh keys) and doas without password which is a security concern.:%0a%3c %0a---%0a> this is a custom shell script to run dump command for backup to remote server with the SCP Command! please not that you will need to setup private key for your scp to use with using a password%0a> %0a> %25note%25'''NOTE:''' The above command pulls the backup from a remote host to the backup location. This requires ssh without password (ssh keys) and doas without password which is a security concern.%0a> @]%0a
64 host:1703976940=138.43.182.133
65 author:1703976649=SplinTer
66 diff:1703976649:1703975800:=1d0%0a%3c %25note%25[@%0a4,7d2%0a%3c %25note%25'''NOTE:''' The above command pulls the backup from a remote host to the backup location. This requires ssh without password (ssh keys) and doas without password which is a security concern.%0a%3c @]%0a%3c %0a%3c ----%0a
67 host:1703976649=138.43.182.133
68 author:1703975800=SplinTer
69 diff:1703975800:1703975767:=1c1%0a%3c this is a custom shell script to run dump command for backup to remote server with the SCP Command! please not that you will need to setup private key for your scp to use with using a password%0a---%0a> this is a custom shell script to run dump command for backup to remote server! please not that you will need to setup private key for your scp to use with using a password%0a
70 host:1703975800=138.43.182.133
71 author:1703975767=SplinTer
72 diff:1703975767:1703975767:=1,62d0%0a%3c this is a custom shell script to run dump command for backup to remote server! please not that you will need to setup private key for your scp to use with using a password%0a%3c %0a%3c #!/bin/ksh %0a%3c #Author SplinTer@NaStYcOdE.Com Free Unix Tech Support At support@nastycode.com%0a%3c # Join Us On IRC At IRC.NaStYcOdE.COM Channel #NaStYcOdE%0a%3c SHELL=/bin/sh%0a%3c PATH=/bin:/sbin19:/usr/bin:/usr/sbin19:/sbin/:/usr/sbin%0a%3c HOME=/root%0a%3c MAILTO="root@NaStYcOdE.com"%0a%3c %0a%3c hostname=NaStYcOdE.COM%0a%3c backup_destination=SplinTer@host.planetofnix.com%0a%3c timestamp=$(date "+%25Y%25m%25d")%0a%3c dest=/home/backup/$timestamp%0a%3c %0a%3c echo%0a%3c cd /home/backup/%0a%3c echo%0a%3c mkdir $timestamp%0a%3c echo%0a%3c cd $dest%0a%3c echo "Curremt Working Backup Directory $dest on $hostname"%0a%3c echo%0a%3c echo "Partition's Needs Backed Up With OpenBSD Dump Command"%0a%3c echo%0a%3c df -h%0a%3c echo%0a%3c echo "Current Backup Location $hostname VPS Folder $dest"%0a%3c echo%0a%3c cd $dest%0a%3c echo%0a%3c pwd%0a%3c doas /sbin/dump -0 -a -h 0 -f /home/backup/$timestamp/root.dmp / %0a%3c doas /sbin/dump -0 -a -h 0 -f /home/backup/$timestamp/tmp.dmp /tmp %0a%3c doas /sbin/dump -0 -a -h 0 -f /home/backup/$timestamp/usr.dmp /usr %0a%3c doas /sbin/dump -0 -a -h 0 -f /home/backup/$timestamp/usr-X11R6.dmp /usr/X11R6 %0a%3c doas /sbin/dump -0 -a -h 0 -f /home/backup/$timestamp/usr-local.dmp /usr/local %0a%3c doas /sbin/dump -0 -a -h 0 -f /home/backup/$timestamp/var.dmp /var %0a%3c doas /sbin/dump -0 -a -h 0 -f /home/backup/$timestamp/home.dmp /home%0a%3c echo "Folder Size Of Backup On $hostname VPS"%0a%3c cd $dest%0a%3c du -sh%0a%3c echo%0a%3c echo "Uploading to $backup_destination Backup Server! User Account SplinTer!"%0a%3c echo%0a%3c echo "Uploading to $backup_destination Going To Take A Hour! Please Keep Calm And Be Patiently Let it Do Its Thing!"%0a%3c cd /home/backup%0a%3c echo%0a%3c echo "Starting Upload to Storage VPS Server host.planetofnix.com In Folder /mnt/sd4/a/vps/SplinTer/backup/nastycode.com/ On Storage VPS"%0a%3c echo%0a%3c /usr/bin/scp -r -i private.key /home/backup/* SplinTer@host.planetofnix.com:/mnt/sd4/a/vps/SplinTer/backup/nastycode.com/%0a%3c echo "Backup Directoy File Size On Backup VPS"%0a%3c du -sh /home/backup/$timestamp%0a%3c echo%0a%3c echo "Uploading to $backup_destination Is Complete! File Path On VPS Server /home/backup/sd4/a/vps/SplinTer/backup/nastycode.com/"%0a%3c echo%0a%3c echo%0a%3c echo "Deleteing $hostname Files From local Backup! Current Directory $dest"%0a%3c rm -fr $dest%0a%3c echo%0a%3c echo%0a%3c echo "This Bash Script Can Be Run As Ofen As You Wish! I'd Run At Least Weekly! Made By SplinTer@NaStYcOdE.Com"%0a
73 host:1703975767=138.43.182.133