Hi,
Using AEM 6.2 SP1 on windows.
I've been asked if we can script an offline backup (stop server, clone dir, start server).
Question: How do you suggest detecting the server has stopped cleanly?
Thanks
Joel
Solved! Go to Solution.
Views
Replies
Total Likes
In your compaction script add a sleep time of 45 seconds (depending on how long your instance takes to shutdown + 20 seconds) after you've shutdown AEM server as part of your script.
Views
Replies
Total Likes
In your compaction script add a sleep time of 45 seconds (depending on how long your instance takes to shutdown + 20 seconds) after you've shutdown AEM server as part of your script.
Views
Replies
Total Likes
Yes, I can add a 30 minute sleep, and that will likely be enough for any size server. I was more thinking of pinging the server until I don't get a ping back, or checking the logs for something.
Considering we'll backup during off hours, a 15 or 30 minute delay might be sufficient.
Views
Replies
Total Likes
More info from the product team --
Based on previous discussions that we’ve had here, with Oak, there is no need to stop the server. You can actually just clone the directory while it is running. The only thing to be mindful of is that we need to ensure consistency between the nodestore and datastore in the backups. You can ensure this by backing up the nodestore first and the datastore second. As long as garbage collection has not been run between these steps, everything should be fine. Scripting this process through a tool like rsync should be pretty straightforward.
Views
Replies
Total Likes
Looking here: https://docs.adobe.com/docs/en/aem/6-2/administer/content/backup-and-restore.html#Offline Backup
There is an inconsistency.
> As long as garbage collection has not been run between these steps, everything should be fine.
I can't see any easy way of detecting a GC. If we need to be live 24/7, I'll look into rsync
We'll be fine with shutting down and backing up via the OS and a homegrown script.
Thanks Scott
Views
Replies
Total Likes
Hi smacdonald,
do we have a adobe doc or adobe support comments regarding the usage of rsync? we are seriously considering this RSYNC option for online backup?
Regards
Surya
Views
Replies
Total Likes
Use of rsync is not documented.
Views
Replies
Total Likes
so when we are not having separate data store(everything in segment store) i don't think this applies "The only thing to be mindful of is that we need to ensure consistency between the nodestore and datastore in the backups." right?
Views
Replies
Total Likes
I would suggest you make a small modification to the stop.bat file so that it removes the conf/cq.pid even on a successful ERRORLEVEL return code. Then, have your backup script detect the presence of conf/cq.pid (is removed) before starting the backup function using whatever method you are using. Put a timer loop in the backup script detection of the cq.pid file and fail out after some unusual amount of time (say 10-15 minutes) so that if the cq.pid file is never removed you get some message/error/warning/failure and don't get stuck in an infinite loop. This will be more graceful to the AEM shutdown of threads, child-processes, etcetera before starting your backup. You will also not be bound to a timer but a state and behavior which should be safer.
Views
Replies
Total Likes