Remove old backups / incremental

djansen1987

Verified User
Joined
May 28, 2009
Messages
6
Dear Directadmin / Users,

I'am managing multiple directadmin server, also controlling the backup.

Recently there came an nice change, so the progress of the backup could be monitored. Also the possibility came to add Append to path to the backup folder which is great!

But now the down site to it, i was not paying attention and got 2 tb of backups on my NAS because it has no retention option. I would be very nice to have this build in. As this saves me a lot of time. Towards the users. How do you guys do this and maybe even use an whole different approach.

Also thinking to make an cron jobs script the login to the ftp and remove folder older then. Maybe this is already made by someone ?

Many Thanks!!
 

nobaloney

NoBaloney Internet Svcs - In Memoriam †
Joined
Jun 16, 2003
Messages
26,119
Location
California
Also thinking to make an cron jobs script the login to the ftp and remove folder older then. Maybe this is already made by someone ?
I run a script on the backup server which, at the same time the backup starts on the main server, renames the backup folder and creates a new one. I save a week's worth of backups, and my script first does a cd to the user's home directory on the backup server and then doe sthis:
Code:
rmdir -Rf backup6
mv backup5 backup6
mv backup4 backup5
mv backup3 backup4
mv backup2 backup3
mv backup1 backup2
mv currentbackup backup1
mkdir currentbackup
Jeff
 

djansen1987

Verified User
Joined
May 28, 2009
Messages
6
I run a script on the backup server which, at the same time the backup starts on the main server, renames the backup folder and creates a new one. I save a week's worth of backups, and my script first does a cd to the user's home directory on the backup server and then doe sthis:
Code:
rmdir -Rf backup6
mv backup5 backup6
mv backup4 backup5
mv backup3 backup4
mv backup2 backup3
mv backup1 backup2
mv currentbackup backup1
mkdir currentbackup
Jeff
Hi Jeff,

Thanks for answering, only i think it can be done more efficient.

Within the current version it is possible from admin level to make a schedule to backup all users and give the backup folder an name link Backup01_MM_DD_YY.
This then will be done for all users.

Only issue i run into is that it need an clean up action. For example after 7 days remove first.

Hope there is an solution for this somewhere out there :)
 

nobaloney

NoBaloney Internet Svcs - In Memoriam †
Joined
Jun 16, 2003
Messages
26,119
Location
California
Thanks for answering, only i think it can be done more efficient.
I'm not sure what you mean. My code is very effecient; the mv command doesn't actuall move anything; it just makes a quick dirctory entry change. milliseconds.
Within the current version it is possible from admin level to make a schedule to backup all users and give the backup folder an name link Backup01_MM_DD_YY.
This then will be done for all users.

Only issue i run into is that it need an clean up action. For example after 7 days remove first.
I suppose you could write a script which will actually look at the dates; personally I think that's less efficient. That's why I do what I do. It's easy enough to see the backup dates; tims; the end time of the backup should be the date/time of the folder, for example do ls -ald backup2 to see the date and time backup2 was completed.

Anyway, that's what I do, and that's how I do it.

Jeff
 

M7Web

Verified User
Joined
Jul 13, 2019
Messages
95
Existe alguma maneira nativa de configurar a retenção de backup?
 
Top