Unique backup names | General Questions and Support | Forum Archive

The free forums are no longer in use. It remains available as read-only archive.

Avatar
Lost password?
Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
sp_TopicIcon
Unique backup names
December 23, 2010
9:16 pm
Avatar
Guest
Guests

I've had a quick look on the forum, but didn't see anything mentioned about my question: how do I give a backup a unique name while setting up mkultiple cron jobs, such that the backup instances are not overwritten. As far as I can see in my testing, you can only preserve backup instances if you let the script give the name, whereby the date and time stamp provide the uniqueness that ensures that files are not overwritten. When you give your own name, there is only one backup instance (the latest) at any time, since the files are overwritten as they have the same name (the one you gave).

 

Is there a way of passing date and time variables to the script along with a unique (fixed) name string, so that many backup instances can be preserved?

 

Thanks!

December 23, 2010
11:26 pm
Avatar
Ovidiu Liuta
Admin
Forum Posts: 2484
Member Since:
September 26, 2010
sp_UserOfflineSmall Offline

Hi Charlie, unfortunately the unique option(date/time stamp) is only available when the backup name are auto-generated. The cron script cloner.cron.php however can be easily be adjusted to accommodate your changes.

 

Regards, Ovidiu

December 24, 2010
9:15 am
Avatar
Guest
Guests

Hi Ovidiu, thanks very much for coming back so quickly. I've looked again at the cloner.cron.php file and wonder whether the adjustments needed are around:

if($_CONFIG[cron_bname]!="")
 $_REQUEST['bname'] = $_CONFIG[cron_bname];

Not being hot on these things, I can't work out what changes to make. Kindly put me ouit of my misery! LaughLaugh

December 24, 2010
9:32 am
Avatar
Ovidiu Liuta
Admin
Forum Posts: 2484
Member Since:
September 26, 2010
sp_UserOfflineSmall Offline

Simply replace this line

 

$_REQUEST['bname'] = $_CONFIG[cron_bname];

 

with

 

$_REQUEST['bname'] = $_CONFIG[cron_bname]."-".date("Y-m-d_H-i");

 

to get a unique name based on date

 

Ovidiu

December 24, 2010
10:39 am
Avatar
Guest
Guests

Brillliant! The change works beautifully; no doubt you are a star, Ovidiu!

Thanks very much for a superb piece of software.

All I need to do now is head to Paypal to make that donation I have been thinking of... 😉

Forum Timezone: America/Chicago
Most Users Ever Online: 867
Currently Online:
Guest(s) 1
Currently Browsing this Page:
1 Guest(s)
Top Posters:
mlguru: 30
Django29: 29
Andy: 21
D: 21
Marcus: 20
Jamie F: 19
Member Stats:
Guest Posters: 737
Members: 9453
Moderators: 2
Admins: 3
Forum Stats:
Groups: 3
Forums: 7
Topics: 2397
Posts: 8236
Newest Members:
Vladimir Smitka
Moderators: TriP: 0, Steve Burge: 0
Administrators: Ovidiu Liuta: 2484, Victor Drover: 1, Valentin Barbu: 0