arrow_upward

Pages (2):
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
GBackup, by HMR (need help)
#1
Hello, 
I want to backup my vps so i installed HMR GBackup from their github. 
And i pressed run
Then i got this
Ofc i won't paste the introduction of the GBackup and etc. 
...¤...¤...¤...¤.........¤...¤...¤...¤...¤...¤...¤...¤...¤...¤
Files & MySQL Backup Folder not found
Creating Folder: Files & MySQL Backup

No valid arguments given, use 'gdrive help' to see available commands
Backuping the DATABASES
-----------------------
-> Dumping database: mysql:[Warning]Usingapasswordonthecommandlineinterfacecanbeinsecure.
-> Dumping database: ERROR2002(HY000):Can'tconnecttolocalMySQLserverthroughsocket'/var/run/mysqld/mysqld.sock'(2)
backup_gdrive.sh: line 171: /tmp/Server_Backup/mysql/ERROR2002(HY000):Can'tconnecttolocalMySQLserverthroughsocket'/var/run/mysqld/mysqld.sock'(2).sql: No such file or directory
-----------------------


Compressing all files for Upload.....
tar: Removing leading `/' from member names
tar: /var/www/vhosts/system/forum.mw5-samp.com/php-fpm.sock: socket ignored
tar: Removing leading `/' from hard link targets
tar: /var/www/vhosts/system/tbs-clan.cf/php-fpm.sock: socket ignored
tar: /var/www/vhosts/system/firex-host.com/php-fpm.sock: socket ignored
tar: /var/www/vhosts/system/eslamelshabrawy.com/php-fpm.sock: socket ignored
tar: /var/www/vhosts/system/media.firex-host.com/php-fpm.sock: socket ignored
tar: /var/www/vhosts/system/bin.amir.ovh/php-fpm.sock: socket ignored
tar: /var/www/vhosts/system/workedia.tk/php-fpm.sock: socket ignored
tar: /var/www/vhosts/system/mw5-samp.com/php-fpm.sock: socket ignored
tar: /var/www/vhosts/system/youssefbasha-dev.tk/php-fpm.sock: socket ignored
tar: /var/www/vhosts/system/samp-pw.ga/php-fpm.sock: socket ignored


-----------------------
Uploading Gbackup_10-04-2018.tar.gz at Google Drive...
Failed to get file: googleapi: Error 404: File not found: -delete., notFound
-----------------------

Clearing Junk files...
-> Removing /tmp/Server_Backup
Done!
...¤...¤...¤...¤...¤...¤...¤...¤...¤`¤...¤...¤`¤`¤
Not it gave me fail, i tried again and the same error. 
Also it ignored every file i want to backup..
#2
Basically, I've the same error. And right now I used more shorter script (without checking anything with if...else statement).

Back to topic, have you tried with sudo? What kind of OS you're running right now?
Thanks to Limitless Hosting and Post4VPS for providing me excellent VPS 13!
#3
Ubuntu 16.04, but i lost everything at my vps and now i want to backup domain files before resetting the vps.
#4
this script is built for centos.
it's not built for any other os.

as I have heard from @Dynamo.
#5
Ugh, then who can help me to backup my files?
@Dynamo? @perryoo11
#6
@youssefbasha,

you might want to open up your discord as I have responded to your request.
#7
Is the problem solved or not? I've my own backup script. I will give you if you need that.
Thanks to Limitless Hosting and Post4VPS for providing me excellent VPS 13!
#8
(04-11-2018, 01:43 PM)tiwil Wrote: Is the problem solved or not? I've my own backup script. I will give you if you need that.

Yes please give me it. Problem not solved..
Thanks for your helping me.
#9
Ok, so, this is my backup code, you need to install drive first as following:
cd /usr/bin
wget -O drive https://drive.google.com/uc?id=0B3X9GlR6EmbnMHBMVWtKaEZXdDg
chmod 755 drive
drive

After using command "drive", you will be given a link from google. Open it, then login with your google account, you will get a "token" or verification code. Copy and paste it to the command line.
Example as following:
Quote:abc@xyz:/usr/bin]# drive
Go to the following link in your browser:
https://accounts.google.com/o/oauth2/aut...tate=state

Enter verification code:

Ok, then you can use the following backup script.
#!/bin/sh
# file name as date
date=$(date +"%Y-%m-%d")

# backup folder
backupfolder="/home/YOUR USERNAME/backups"
backuptarget="/home /etc /var/www /usr/local" # folder to backup

# database
dbhost="localhost"
dbuser="YOUR DB USER"
dbpassword="YOUR DB PASSWORD"

# make directory if not exists
mkdir -p $backupfolder
mkdir -p $backupfolder/mysql
echo "Starting backup"

# backup database, thanks to HMR
databases=$(mysql --host="$dbhost" --user="$dbuser" --password="$dbpassword" -e "SHOW DATABASES;" 2>&1 | grep -v "Warning: Using a password" | tr -d "| " | grep -v Database)
for db in $databases; do
    if [ "$db" != "information_schema" ] && [ "$db" != "performance_schema" ] && [ "$db" != "mysql" ] && [ "$db" != _* ] ; then
        mysqldump --compress --host="$dbhost" --user="$dbuser" --password="$dbpassword" --events $db > $backupfolder/mysql/$db.sql 2>&1 | grep -v "Warning: Using a password"
    fi
done

# compressing file
tar -cf $backupfolder/$date.tar.gz $backuptarget
echo "Backup done named $date.tar.gz"
echo "Starting upload to Google Drive"
# uploading file
drive upload --file $backupfolder/$date.tar.gz
echo "Done, removing local backup files"
# removing file
rm $backupfolder/$date.tar.gz
echo "Job done"

Let me know if you're facing any errors (which shouldn't happened, already test it with my VPS.)
Thanks to Limitless Hosting and Post4VPS for providing me excellent VPS 13!
#10
Where to add this backup script? (name)
I installed everything but now waiting to select the db backup and etc so i want to edit it.
Pages (2):


person_pin_circle Users browsing this thread: 1 Guest(s)
Sponsors: VirMach - Host4Fun - CubeData - Evolution-Host - HostDare - Hyper Expert - Shadow Hosting - Bladenode - Hostlease - RackNerd - ReadyDedis - Limitless Hosting