Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to delete a backup #124

Open
zilzilonline opened this issue Feb 23, 2020 · 1 comment
Open

How to delete a backup #124

zilzilonline opened this issue Feb 23, 2020 · 1 comment

Comments

@zilzilonline
Copy link

I scheduled to backup every midnight. I would like to keep only 3 latest backups in my dropbox. So how can i delete old copies?

@robbielove
Copy link
Contributor

//write some code to check that more than 3 backups exist
if (Storage::delete($path)) {
echo "deleted";
}

https://laravel.com/docs/8.x/filesystem#retrieving-files
https://laravel.com/docs/8.x/filesystem#directories

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants