Support the ongoing development of Laravel.io →
posted 10 years ago
Packages
Last updated 2 years ago.
0

Looking at the code: https://github.com/heybigname/backup-manager/blob/master/src/Integrations/Laravel/DbBackupCommand.php it would seem that confirmation is only asked when not all required fields are filled. You seem to be missing destinationPath Otherwise create an issue in that repo.

Last updated 2 years ago.
0

Damn, I see it. Now I only would like to know how to create dynamic filenames.. any idea on this?

Last updated 2 years ago.
0

Hmm, not really. You could off course use a bash script or something to automate this. You could also check out https://github.com/indatus/dispatcher where you can schedule cronjobs with Laravel, so I guess you could just schedule a job where you set the arguments and call the command.

Last updated 2 years ago.
0

Yeah totally depends on how your running the script. I use dispatcher (link above) and love it.

But if your using crontab you can always set a variable and use that. For example I use the following for my old backup script TIMESTAMP=$(date +"%F") then call it in the generation command. See below the old script I used for usage and example;

#! /bin/bash

TIMESTAMP=$(date +"%F")
BACKUP_DIR="$HOME/mysql-backup/$TIMESTAMP"

echo "Starting backup at $TIMESTAMP"
echo ""
echo "Backup DIR: $BACKUP_DIR"
echo ""

mkdir -p "$BACKUP_DIR"

databases=$(mysql -e "SHOW DATABASES;" | grep -Ev "(Database|information_schema)")

for db in $databases; do
  mysqldump --force --opt --databases $db | gzip > "$BACKUP_DIR/$db.gz"
  echo "Backup created: $BACKUP_DIR/$db.gz"
done


echo "Done!"
echo ""
Last updated 2 years ago.
0

I am using laravel forge.

Last updated 2 years ago.
0

That should support cronjobs + that package.

Last updated 2 years ago.
0

I am familiar with one of the best managed service providers to backup virtual machines, databases and servers to local / mapped network drive, locally hosted backup server, or online backup server hosted in datacenter. You can run virtualized backup server instance on public cloud such as Amazon S3 so that you don't need to maintain any server and storage hardware. Check Ahsay Backup Software .

0

Sign in to participate in this thread!

Eventy

Your banner here too?

Ronster ronster Joined 3 Mar 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.